State Management and Stores Training
This 2-day course provides a deep dive into Svelte 5's reactivity system and state management patterns. Participants master runes (`$state`, `$derived`, `$effect`), build class-based reactive stores, use the context API for scoped state, implement cross-component communication, and learn persistence and synchronization patterns.
Master application state management in Svelte with this focused 2-day training. Learn to build predictable, maintainable state architectures using Svelte stores, the context API, and reactive patterns that scale from simple components to complex applications.
Training Details
| Duration | 2 days (16 hours) |
| Level | Intermediate |
| Delivery | In-person, Live online, Hybrid |
| Certification | N/A |
Who Is This For?
- Svelte developers building applications with complex state
- Frontend engineers designing state architectures
- Teams migrating from Redux or MobX to Svelte stores
- Developers building shared state across component trees
Learning Outcomes
After completing this training, participants will be able to:
- Implement writable, readable, and derived stores for various use cases
- Build custom stores with encapsulated business logic
- Use the context API for scoped state management
- Design reactive data flow patterns across component hierarchies
- Integrate stores with SvelteKit load functions and server data
- Test and debug state management patterns effectively
Detailed Agenda
Day 1: Svelte Store Fundamentals
Module 1: Built-in Store Types
- Writable stores: creation, set, update, subscribe
- Readable stores for external data sources
- Derived stores for computed values
- The `$` auto-subscription syntax
- Hands-on: Build a real-time notification system
Module 2: Custom Store Patterns
- Stores with custom methods and validation
- Store factories for reusable patterns
- Async stores for API integration
- Persistent stores with localStorage and sessionStorage
- Hands-on: Create a shopping cart store with persistence
Module 3: Context API
- `setContext` and `getContext` for scoped state
- Context vs stores: when to use each
- Typed context with TypeScript
- Nested context and provider patterns
- Hands-on: Build a theme and configuration provider
Day 2: Advanced Patterns and Integration
Module 4: Reactive Data Patterns
- Store composition and chaining
- Event-driven store updates
- Debouncing and throttling reactive updates
- Store-based undo/redo patterns
- Hands-on: Build a collaborative text editor state layer
Module 5: SvelteKit Integration
- Stores in SvelteKit page and layout data
- Server-to-client state hydration
- URL-based state with `$page` store
- Form state management with actions
- Hands-on: Integrate stores with SvelteKit data loading
Module 6: Testing and Debugging
- Unit testing stores in isolation
- Testing components with store dependencies
- Store debugging techniques and devtools
- Performance profiling reactive chains
- Hands-on: Write comprehensive store test suites
Prerequisites
- Svelte fundamentals (components, reactivity, template syntax)
- Basic JavaScript/TypeScript knowledge
- Understanding of component-based architecture
- Familiarity with async patterns (Promises, async/await)
Delivery Formats
| Format | Description |
|---|---|
| In-Person | On-site at your company's location, hands-on with direct interaction |
| Live Online | Interactive virtual sessions with screen sharing and real-time labs |
| Hybrid | Combination of on-site and remote sessions, flexible scheduling |
All formats include hands-on labs, course materials, pattern reference guides, and post-training support.
Ready to get started?
Request a training quote for your team — in-person, live-online, or hybrid.