Skip to content

Conversation

@ohansemmanuel
Copy link
Owner

@ohansemmanuel ohansemmanuel commented Oct 28, 2019

What is this PR about? 🤔

A refactor from #1 - from class component to functional component (with hooks)

Changes 🎁

  • Animate the clap via the hook, useClapAnimation as opposed to a Higher-Order Component
  • 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 ohansemmanuel changed the title #02 use hooks #02: The Medium Clap (with useClapAnimation) Oct 28, 2019
@ohansemmanuel ohansemmanuel mentioned this pull request Dec 31, 2019
1 task
@ohansemmanuel ohansemmanuel mentioned this pull request Feb 15, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants