Collection of things I had to get used to after upgrading from React v17 to React v18
StrictMode
in React 18 adds a second rendering immediately after initial mount.
When using the useEffect
hook, you should always add a cleanup if needed.
Here's what Dan Abramov has to say about it.
However, sometimes this can be a bit trickier...
TBC
TBC
This is a living document and will be continously expanded as I learn more about React 18 🤓.