advanced-react-patterns-ultrasimplified
advanced-react-patterns-ultrasimplified copied to clipboard
#02: The Medium Clap (with useClapAnimation)
What is this PR about? 🤔
A refactor from #1 - from class component to functional component (with hooks)
Changes 🎁
- [x] Animate the clap via the hook,
useClapAnimationas opposed to a Higher-Order Component - [x] Use a callback ref to hold DOM elements being animated
Before/After 📸
👉https://advanced-react-patterns-ultrasimplified.netlify.com/the-medium-clap
Other comments 💬
Note how the Usage of the component is now simplified:
