3 ms·
React does full tree redraws (well, unless you use memo). useEffect is for side-effects.
by paulddraper 3y ago
React does full tree redraws (well, unless you use memo).
useEffect is for side-effects.
- toastercat 3y agoIt does not. Child components will only render when their parent component re-renders or for example, its state changes. Either way, this is different than what I mean with Mithril.js (it does full tree re-renders on event handler calls or when a manual redraw function is called).
- Izkata 3y agoClass components have "shouldComponentUpdate()" that avoids this entirely.