Svelte Tutorial for Beginners - Component Events [2/2] - Event Forwarding
lihautan
View ChannelAbout
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
Latest Posts
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
You May Also Like
Upgrade Your Camera Gear
AI-recommended products based on this video

COTUBLR 31 Inch Computer Desk, Home Office Desk, Simple Modern Small Desk for Bedroom, Writing Desk with Storage Bag, Study Table for Students, Grey Oak

SmallRig FX3 / FX30 HawkLock Quick Release Camera Cage Kit for Sony with XLR Handle Extension, Wrist Strap and Cable Clamp for HDMI, QR Cold Shoe, NATO Rail/QR Plate for Arca,Titanium Gray - 4771

koolehaoda L Shape Camera Bracket, Video Vertical Shooting Quick Release Plate L Stand Arca Swiss Compatible for Tripod Head Ballhead DSLR Camera

ANXRE 71" Phone Tripod, NT79 Extendable Selfie Stick for Cell Phone&Camera Photo Video Kits, Travel Tripod Stand with Remote for Video Recording, Phone Holder Tripod Compatible with Phone Camera Gopro

NEEWER Advanced 18 inch LED Ring Light for Phone, LCD Touch Screen, 2.4G Remote Lights Control, 3200-5600K, Tripod Light for iPhone Action Camera, for Studio Makeup TikTok YouTube Video Salon (Black)

SmallRig ZV-E1 Camera Baseplate for Sony ZV-E1, Built-in Cold Shoe Mount and QR Plate (for Arca) Quick Switch Between Tripod and Stabilizer for DJI RS 2 / RSC 2 / RS 3 / RS 3 Pro - 4314

Inland 32GB Class 10 SDHC Flash Memory Card Standard Full Size SD Card USH-I U1 Trail Camera by Micro Center (2 Pack)

AKASO V50 Elite 4K60fps Touch Screen WiFi Action Camera Voice Control EIS 131 feet Waterproof Camera 8X Zoom Remote Control with with 64GB U3 MicroSDXC Memory Card Global Recycled Standard

2 Pack Micro Memory Card 128 GB with Adapter, C10/U3/UHS-I/A1, TransFlash Card, TF Card for Camera, Smartphone, Tablet, Drone (Red 128GB *2)

Mini Body Camera Video Recorder, Pocket Camera, Tiny Camera, Nanny Small Cam, Body Spy Camera, Small Security Camera for Home Outdoor Office and More (with 32G Red Super high-Speed Memory Card)

10 Inch Tablet, Android 15 Tablets with 18GB RAM+128GB ROM(Expand to 1TB), Octa Core 1280 * 800 IPS HD Display, 6000mAh Battery, Dual 5MP+8MP Camera, 5G/2.4G WiFi

LICAEVEY 84MP Digital Camera, 6K 18X Optical Zoom Wide Angle DSLR Camera, 1500mAh Li Battery 3 Inch LCD Vlogging Camera for Travel Recording Video (Black)

eufy Security, eufyCam S220 (eufyCam 2C Pro) 2-Cam Kit, Wireless Home Security Camera, 2K Resolution, 180-Day Battery Life, HomeKit Compatibility, IP67, Night Vision, Motion Only Alert, No Monthly Fee









