You are on page 1of 1

Rules of Hooks

Only call React Hooks in React Only call React Hooks at the Top
Functions Level

React Don’t call them Don’t call them


Custom Hooks
Component in nested in any block
(covered later!)
Functions functions statements

+ extra, unofficial Rule for useEffect(): ALWAYS add everything you refer to
inside of useEffect() as a dependency!

You might also like