26 articles tagged #state-management on hackpile.dev.
- Rerunning Load Functions and Dependency Tracking
Learn when SvelteKit reruns load functions, how dependency tracking works, and how invalidate(), invalidateAll(), depends(), and untrack() keep data fresh.
- The page Object from $app/state
A guide to the SvelteKit page object: every property it exposes and how it stays reactive during navigation.
- $derived
Master Svelte 5's $derived rune for computed values. Learn $derived vs $derived.by, dependency tracking, and memoization patterns.
- $state
Master Svelte 5's $state rune for reactive state management. Learn deep reactivity, proxy mechanics, and common pitfalls.
- Fine-Grained Reactivity
Intro to Svelte 5 reactivity and runes: how reactive programming works, why it matters, and the runes powering modern Svelte apps.
- Advanced Props Patterns
Master advanced $props patterns in Svelte 5: rest props, $bindable, generics, TypeScript, and robust component architecture.
- State Management
Learn when to use $state, context, and module-level state, plus how to build performant reactive stores with $state.raw in Svelte 5.
- Shopping Cart with Context
Build a production-grade shopping cart with Svelte 5 context, featuring reactive state, persistence, scoped isolation, and multiple independent contexts.
- Updating Shared State Through Context
Learn the difference between read-only and read-write context, how to pass actions instead of raw state, and design stable, maintainable context APIs.
- Class-Based Context
Master TypeScript classes with Svelte 5 runes for encapsulated, type-safe context, including private fields and lifecycle management.