Surprise! Svelte Secretly Sending Signals
summary
Svelte 5’s Runes are implemented as Signals and the code builds a tiny reactivity system that actually works: a Proxy with get/set traps records per-key reads, a global currentEffect wires functions to the exact keys they read, effects store their dependency sets and clean up before rerun, and updates are batched via a microtask queue to avoid sync re-runs that freeze inputs. The demo surfaces pitfalls like stale subscriptions and await-breaking dependency capture and shows the concrete fixes. Runes Signals
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:25Live coding demo: reactivity basics
- 2:57Writable stores and observer pattern
- 4:22Reactivity with Proxy API
- 6:30Building a reactivity system with signals
- 9:04Optimizing signal dependencies per key
- 12:46Decoupling subscribe from writable store
- 14:12Tracking effects with currentEffect
- 17:24Fixing effect rerun dependencies
- 19:30Managing dependencies with sets
- 21:23Finalizing the signal system
- 22:06Scheduling effects asynchronously
- 24:39Recap and applications
- 26:26Question and answer session
related talks
29mRevolutionary Signals
06mEmbracing Reactivity: Signals Unveiled in Modern Web Frameworks
52mIt's Time To Talk About Signals
29mResponsive Svelte (exploring Svelte's reactivity)
28mOptimize for Vibes: Svelte 5 and the New Age of Svelte
42mReactivity and signals demystifying frontend magic
38mBuild your own Svelte 5
28mSignals: What, How, and Why!
