Skip to content

Examples

Practical examples demonstrating state-sync patterns.

Framework examples

ExampleStackDescription
React + ZustandReact, Zustand, BroadcastChannelShopping cart synced across browser tabs
Vue + Pinia + TauriVue 3, Pinia, Tauri v2Settings panel synced across Tauri windows
Tauri + Any StoreTauri v2, Any frameworkMulti-window sync with any state manager
Electron + Any StoreElectron, Any frameworkMulti-window sync with any state manager

Core patterns

ExampleDescription
Source of truthIn-memory transport, revision gate, invalidation cycle
Throttling & coalescingdebounceMs, throttleMs, leading/trailing, visual timeline
toState mapping & key filteringBackend → frontend transform, pickKeys/omitKeys, ctx
Persistence stackCompression, TTL, cross-tab sync, cached load
Structured loggingJSON logger, error metrics, observability
Error handling & retryGraceful degradation, automatic retry, UI indicators
Persistence with migrationsSchema versioning, data migration, validation

See also

Released under the MIT License.