Video details

Svelte 101: Component Events - Event Forwarding [2/2]


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
Related Resources Svelte Svelte REPL Svelte Tutorial: Event forwarding Svelte Tutorial: DOM Event forwarding Event bubbling and capturing
🥰 Support me
Want to learn more from me? Check out these links:
Twitter: Blog: Newsletter:
#svelte #svelte101
Thanks for watching 🥰 -- with love, Li Hau