DOM events bubble. When an event happens on an element, it first runs the handlers on it, then on its parent, then all the way up on other ancestors.
Do component event works the same way? Does it run the handler on the component, then on its parent component, then all the way up?
You'll find in the video that, the answer is no.
And we are going to take a look how we can recreate the event bubbling behaviour for component events.
Introduction 00:00 DOM event bubbling 00:29 Component event forwarding 03:41 DOM event forwarding 08:41
🥰 Support me https://www.buymeacoffee.com/lihautan
Want to learn more from me? Check out these links:
Twitter: https://twitter.com/lihautan Blog: https://lihautan.com/ Newsletter: https://lihautan.com/newsletter
Thanks for watching 🥰 -- with love, Li Hau