velt-live-state-sync-best-practices
Installation
SKILL.md
Velt Live State Sync Best Practices
Comprehensive guide for implementing Velt's Live State Sync API — real-time shared state across clients with sub-10ms latency, offline support, and Redux middleware integration. Contains 14 rules across 6 categories.
When to Apply
Reference these guidelines when:
- Adding real-time shared state (counters, selections, cursors, tool modes) to a collaborative app
- Using
useLiveStatefor useState-like shared state - Using
useSetLiveStateData/useLiveStateDatafor separated read/write patterns - Working with the
LiveStateSyncElementfor observable subscriptions or promise-based fetches - Integrating Redux with
createLiveStateMiddlewarefor full store sync - Broadcasting state updates from your server via the REST API
- Monitoring connection state for offline/online indicators