advanced-react-patterns-ultrasimplified icon indicating copy to clipboard operation
advanced-react-patterns-ultrasimplified copied to clipboard

#02: The Medium Clap (with useClapAnimation)

Open ohansemmanuel opened this issue 6 years ago • 0 comments

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, useClapAnimation as 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:

https://i.imgur.com/Uc6WZWm.png

ohansemmanuel avatar Oct 28 '19 03:10 ohansemmanuel