Photo by Lautaro Andreani on Unsplash
What are the rules that must be followed while using React Hooks?
·Aug 31, 2022·
1 min read
Only Call Hooks at the Top Level
Don’t call Hooks inside loops, conditions, or nested functions.
Only Call Hooks from React Functions
Rules of Hooks –. (n.d.). React. reactjs.org/docs/hooks-rules.html