AI agents: fetch the documentation index at llms.txt. Markdown versions are available by appending .md to any page URL, including this page's markdown.
@stratasync/mobx
MobX reactivity adapter for observable model properties and automatic UI updates in Strata Sync.
Implements ReactivityAdapter using MobX. Makes synced model properties observable so components re-render when data changes.
What it provides
mobxReactivityAdapter: a pre-configured singleton implementingReactivityAdapterwith MobX observables, computed values, reactions, and batched updatescreateMobXReactivity: a factory function returning the same adapter (useful for explicit instantiation)- MobX helpers: dirty tracking, relation helpers, and model utilities
- Core re-exports: model decorators and base classes from
@stratasync/core(see Re-exported core APIs)
Installation
npm install @stratasync/mobx mobxPeer dependencies
| Package | Version |
|---|---|
mobx | ^6.0.0 |
Usage
Pass the adapter when creating the sync client.