https://dev.to/usama_dev/react-hooks-and-the-rules-of-hooks-the-understanding-that-finally-clicked-for-me-hm4 - #React #Hooks are an ordered list of references into their internals. So defining them conditionally breaks the order. Or defining them outside React functions means they never tie to React internals. Brilliant observation https://github.com/Usamaazeem03.
React Hooks and the Rules of Hooks – The Understanding That Finally Clicked for Me

Today, something finally clicked for me. I had been using React Hooks for a long time, but if I’m...

DEV Community