Video details

Svelte 101: Component Events [1/2]

Svelte
03.27.2021
English

Components in a lot of ways are similar to DOM elements. Attributes to elements vs props to components; DOM events to elements vs component events to components.
In this video, we are going to explore why and how to implement component events.
Introduction 00:00 Passing callback functions into component 00:34 Why callback function may not be the best way? 04:11 How to use component events 07:42 Component event helps decouple event dispatching and event handling 12:57
---
đź’»
REPL https://svelte.dev/repl/c594836315704e0aa16514be7a31a86f?version=3.35.0
đź“š
Related Resources Svelte https://svelte.dev Svelte REPL https://svelte.dev/repl Svelte Tutorial: Component Events https://svelte.dev/tutorial/component-events
🥰 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
#svelte #svelte101
Thanks for watching 🥰 -- with love, Li Hau