@mmstack/primitives 22.9.3 → 22.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -766,7 +766,8 @@ const profile = persistedStore({ first: '', last: '' }, {
|
|
|
766
766
|
`persistedStore` is `store()` + `persist()`. Reach for `persist(store, opt)` directly to add durability to a store you already have — one you also `meshSync`, or a worker-owned store's replica. Persistence is a reader over the op-log, so it composes with the other readers on the same store.
|
|
767
767
|
|
|
768
768
|
```typescript
|
|
769
|
-
import { store, persist
|
|
769
|
+
import { store, persist } from '@mmstack/primitives';
|
|
770
|
+
import { meshSync } from '@mmstack/mesh';
|
|
770
771
|
|
|
771
772
|
const doc = store({ title: '', body: '' });
|
|
772
773
|
persist(doc, { key: 'draft', store: idbKeyval }); // durable to IndexedDB
|