Reactive Dependencies and Ordering
Understand how Svelte tracks dependencies and orders reactive statements.
Static Analysis
The compiler scans each $: statement for references to reactive variables. Those become its dependencies.
Implicit Dependencies
Indirect references (through functions) may not be detected. Reference variables directly when possible.
All lessons in this course
- Reactive Statements: $: block
- Reactive Dependencies and Ordering
- When to Use Stores vs Local State
- Avoiding Stale Closures