8 ms·
It's a huge mess in the real world. Without good understanding and discipline, I've seen components which react profiler says re-render 15 times on an initial l
by eterm 1y ago
It's a huge mess in the real world. Without good understanding and discipline, I've seen components which react profiler says re-render 15 times on an initial load because of cascading useEffect hooks.
I lack the expertise to be able to go in and rip it all out, and while I can share articles like this and others such as "You might not need useEffect", there isn't a really obvious way to deal with it all, especially if there are places which genuinely could do with proper memoisation.