4 ms·
>If you keep all your logic super high level, then your entire component tree will re-render often. This is not true, especially if you're following _actual_ b
by zarathustreal 5y ago
>If you keep all your logic super high level, then your entire component tree will re-render often.
This is not true, especially if you're following _actual_ best practices and using e.g. React.memo() and immutable state updates. React is explicitly built around the idea that you don't need to re-render every part of the DOM on every state update.
- activitypea 5y agoRight, but you do have to re-render the React DOM, and for huge apps that can get expensive, at least in theory. I've yet to work on an app big enough where we have to reach for memo/PureComponent except for very specific cases e.g. a stock price ticker