React Hooks
up:: React
- Every hook starts with
useXXX
- Must be used inside component functions
Rules of Hooks
- Only call Hooks in React Functions
- React Component Functions
- Custom Hooks
- Only call Hook at the top level
- Not in nested functions
- Not in if statements