In this video, we will talk about useEvent the upcoming React hook. We will talk about the problem that this hook is trying to solve. The useEvent hook is yet not part of ReactJs. This hook is proposed in an RFC by the React team.
I have created a custom useEvent hook in this video for demonstration purposes. We will go through 2 cases where useEvent can be really useful.
Think about it this way:
When we need to handle a side-effect in your React app we use the useEffect hook. But what when you need to handle an event in your React app? useEvent will come to your rescue.
The useEvent RFC by React team: https://github.com/reactjs/rfcs/blob/...
-----------------------------------------------------------------
8020 Lessons is the project to help you equip yourself 💪 with the most essential skills of the 21st century. Learn 20% skills that get you 80% results.
Become a better JavaScript developer in 10 minutes ⏱️ a week.
Concise and to the point 🎯 coding lessons.
Join the newsletter now: https://www.getrevue.co/profile/8020l...
Thank You! Master and learn JavaScript like never before: https://8020lessons.in/