Spaces:
Running
Running
# Stores | |
State management using Svelte stores | |
## Purpose | |
Single source of truth for application state with reactive updates | |
## Layout | |
``` | |
stores/ | |
βββ context.md # This file | |
βββ loading.ts # Loading state and progress | |
βββ game.ts # Game instance and running state | |
βββ console.ts # Console messages with unique IDs | |
βββ editor.ts # Editor content and settings | |
βββ chat-store.ts # Chat messages and connection state | |
βββ ui.ts # UI state (view modes including about, errors) | |
``` | |
## Scope | |
- In-scope: Application state, reactive data | |
- Out-of-scope: Business logic, UI components | |
## Entrypoints | |
- Components subscribe for reactive updates | |
- Controllers update state through store methods | |
- Stores expose data and update methods | |
## Dependencies | |
- svelte/store for reactive state | |