state-ref
- Universal state management library focused on data immutability
- Combines proxies and functional programming lens pattern for efficient state management
- Provides fine-grained control over deeply structured data
- Designed for easy integration with UI frameworks including Svelte, React, Preact, Vue, Solid, and Lithent
Key Features
- Immutable state management with
.value
access pattern - Subscription system that only reacts to accessed values
- Supports primitive types and complex nested objects
- Flux-like state management option via
createStoreManualSync
- Framework-specific connectors available as separate packages
Framework Support
- Svelte: Returns Svelte Writable stores synchronized with state
- React/Preact: Direct stateRef access in components
- Vue: Returns Vue Reactive objects
- Solid: Returns Solid Signals
- Lithent: Works directly without connector
Target Audience
- Developers needing immutable state management
- Projects using multiple frameworks that could benefit from shared state logic
- Teams requiring fine-grained control over state updates
Implementation Highlights
- Uses
copyOnWrite
pattern for safe state modifications - Provides
copyable
helper for object state management - Supports both direct updates and centralized Flux-like patterns
Links:
preactreactsolidjsstatestoresveltevue
Author unavailable
We couldn’t load the author for this library. The library remains visible, but some actions are unavailable.
If you maintain this library, please sign in and claim it so your profile appears here.
Follow actions are hidden until an author profile is available.
Featured Stories
No featured articles here. Navigate to an article, then pick the Feature on menu button