Svelte Tutorial for Beginners - Component Events [2/2] - Event Forwarding

lihautan โ€ข April 4, 2021
Video Thumbnail
lihautan Logo

lihautan

@lihautan

About

Hi ๐Ÿ‘‹ , I am lihautan (full name Tan Li Hau) a frontend engineer at Shopee Singapore. 5 things about me ๐Ÿ˜Ž 1๏ธโƒฃ I grew up in Penang, Malaysia (a place with great food ๐Ÿคค ) 2๏ธโƒฃ I am a core maintainer of Svelte https://github.com/sveltejs/svelte 3๏ธโƒฃ I love frontend technologies ๐Ÿ˜ 4๏ธโƒฃ I love sharing tips on Svelte, React, CSS 5๏ธโƒฃ I love explaining things one layer of abstraction below ๐Ÿฅฐ If you like what I am doing, consider buying me a coffee https://www.buymeacoffee.com/lihautan

Video Description

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 --- ๐Ÿ’ป REPL https://svelte.dev/repl/cfcb6407b0c44b6298a4fd27f7aec109?version=3.35.0 ๐ŸŽง Svelte Tutorial for Beginners https://www.youtube.com/playlist?list=PLoKaNN3BjQX3mxDEVG3oGJx2ByXnue_gR ๐Ÿ“š Related Resources Svelte https://svelte.dev Svelte REPL https://svelte.dev/repl Svelte Tutorial: Event forwarding https://svelte.dev/tutorial/event-forwarding Svelte Tutorial: DOM Event forwarding https://svelte.dev/tutorial/dom-event-forwarding JavaScript.info: Event bubbling and capturing https://javascript.info/bubbling-and-capturing ๐Ÿฅฐ 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 #sveltetutorial #sveltebeginner Thanks for watching ๐Ÿฅฐ -- with love, Li Hau

Upgrade Your Camera Gear

AI-recommended products based on this video

Loading...
EMEET 2024 Upgraded C960 Webcam for PC, Autofocus, 1080P HD, 73ยฐ View Angle, Computer Camera w/Privacy Cover and Microphone, Plug and Play USB Webcam for Video Calling/Zoom/Teams/Google Meet

EMEET 2024 Upgraded C960 Webcam for PC, Autofocus, 1080P HD, 73ยฐ View Angle, Computer Camera w/Privacy Cover and Microphone, Plug and Play USB Webcam for Video Calling/Zoom/Teams/Google Meet

(33,760)
39.99
PrimeFREE delivery Saturday, June 14
100+ bought in past month
Loading...
EMEET C960 Webcam with Tripod, 1080P Webcam with Microphone, Adjustable Height Mini Tripod, C960 Web Camera with Privacy Cover, Plug & Play with Stand for Zoom/Skype/YouTube/FaceTime

EMEET C960 Webcam with Tripod, 1080P Webcam with Microphone, Adjustable Height Mini Tripod, C960 Web Camera with Privacy Cover, Plug & Play with Stand for Zoom/Skype/YouTube/FaceTime

(33,760)
49.99
PrimeFREE delivery Saturday, June 14
500+ bought in past month
Loading...
EMEET C960 Webcam with Tripod, 1080P Webcam with Microphone, Adjustable Height Mini Tripod, C960 Web Camera with Privacy Cover, Plug & Play with Stand for Zoom/Skype/YouTube/FaceTime

EMEET C960 Webcam with Tripod, 1080P Webcam with Microphone, Adjustable Height Mini Tripod, C960 Web Camera with Privacy Cover, Plug & Play with Stand for Zoom/Skype/YouTube/FaceTime

(33,760)
49.99
PrimeFREE delivery Saturday, June 14
500+ bought in past month
Loading...
SD Card Reader for iPhone iPad Camera,Dual Card Slot Memory Card Reader Supports SD and TF Card Trail Camera Viewer Sd Card Adapter Portable Micro Sd Card Reader No Application Required Plug and Play

SD Card Reader for iPhone iPad Camera,Dual Card Slot Memory Card Reader Supports SD and TF Card Trail Camera Viewer Sd Card Adapter Portable Micro Sd Card Reader No Application Required Plug and Play

(20,249)
8.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
10K+ bought in past month
Loading...
Blink Outdoor 4 (newest model) โ€“ Wireless smart security camera, two-year battery life, 1080p HD day and infrared night live view, two-way talk. Sync Module Core included โ€“ 3 camera system Reducing CO2
Best Seller

Blink Outdoor 4 (newest model) โ€“ Wireless smart security camera, two-year battery life, 1080p HD day and infrared night live view, two-way talk. Sync Module Core included โ€“ 3 camera system Reducing CO2

(10,544)
$74.99
FREE delivery Fri, Oct 3
10K+ bought in past month
Loading...
Apple iPad 11-inch: A16 chip, 11-inch Model, Liquid Retina Display, 128GB, Wi-Fi 6, 12MP Front/12MP Back Camera, Touch ID, All-Day Battery Life โ€” Blue EPEAT
Best Seller

Apple iPad 11-inch: A16 chip, 11-inch Model, Liquid Retina Display, 128GB, Wi-Fi 6, 12MP Front/12MP Back Camera, Touch ID, All-Day Battery Life โ€” Blue EPEAT

(10,496)
$279.00$276.21
FREE delivery Fri, Oct 17
10K+ bought in past month
Loading...
DJI Mini 4K, Drone with 4K UHD Camera for Adults, Under 249 g, 3-Axis Gimbal Stabilization, 10km Video Transmission, Auto Return, Wind Resistance, 1 Battery for 31-Min Max Flight Time, Intelligent Flight

DJI Mini 4K, Drone with 4K UHD Camera for Adults, Under 249 g, 3-Axis Gimbal Stabilization, 10km Video Transmission, Auto Return, Wind Resistance, 1 Battery for 31-Min Max Flight Time, Intelligent Flight

(1,978)
299.00
FREE delivery June 12 - 17. Details
4K+ bought in past month