These are my notes on using React hooks.
- Use to perform anything that has side-effects (API calls, modify local storage, etc)
- This does not block visual renders
Use to create a memoized function that doesn’t have to change during renders - unless one of the dependencies have changed.
To run something that has a side-effect
useCallbackto create a memoized function
useEffectover the memoized function to mark it as as having side-effects