4 ms·
Have you done a lot of work with Hooks and useEffect? React changed the entire component lifecycle with the introduction of hooks. All sorts of weird things tri
by ScottFree 7y ago
Have you done a lot of work with Hooks and useEffect? React changed the entire component lifecycle with the introduction of hooks. All sorts of weird things trigger re-renders now, including when a dependent function changes. You have to surround all of those with useCallback.
I should do a thorough writeup of the infinite loop issue in React.
- mc3 7y agoI've not used hooks yet, but it's on my list to learn. Thanks for the warning though!