advanced-react-patterns-ultrasimplified
advanced-react-patterns-ultrasimplified copied to clipboard
#06: Custom Hooks
What is this PR about? 🤔
Break apart functionality from the component into smaller bits, reusable hooks.
Changes 🎁
- [x] Created a
useClapState
hook to handle related state logic - [x] Created a
useEffectAfterMount
to handle side effects after mount - [x] Created a
useDOMRef
hook to save DOM refs via the data-attribute:refkey
- [x] Animated a coffee cup with the hooks created
Before/After 📸
https://advanced-react-patterns-ultrasimplified.netlify.com/custom-hooks
Other comments 💬
NA