3 ms·
When you change the props of a component it re-renders. Just because you use pure functions doesn't mean you don't get DOM diffing, that's silly.
by s_y_n_t_a_x 8y ago
When you change the props of a component it re-renders.
Just because you use pure functions doesn't mean you don't get DOM diffing, that's silly.
- petilon 8y agoAt some point you have to have state. See where "state should live" here: https://reactjs.org/docs/thinking-in-react.html https://reactjs.org/docs/thinking-in-react.html But the very fact that we're having this debate is proving my point. React's programming model is unnecessarily complicated. JavaScript + DOM is all you need. The simple libs (each less than 500 lines) I pointed to get you close to this without sacrificing productivity or code maintainability while keeping the programming model simple.
- s_y_n_t_a_x 8y agoTo reply to your last comment, each project is different, and if you just want a few things on a page, sure use a small lib like what you suggested. But at a certain point you start reinventing the wheel and no other developer will be able to jump into it. You need a framework for large projects with a team and potential future members. React isn't complicated, you're making out to be.