Slide 46
Slide 46 text
Rule of Hooks
1. Only Call Hooks at the Top Level
Don’t call Hooks inside loops, conditions, or nested functions.
2. Only Call Hooks from React Functions
Not from regular JS functions or inside class components, but you can call them from custom
hooks.