Skip to content

Frontend framework integrations

Start with the framework-free store. Create one store per node/document path and share it between consumers. A store that opens and closes the document takes a handle factory, such as createDocumentStore(() => peerborne.doc(path)), and opens a fresh handle after a remount closed the previous one. A closed handle does not reopen when beekemForkStore is configured or the document is coordinated. A fresh handle loads from a connected peer, so a remount after the close needs one, or a factory that restores the latest checkpoint with restoreEncryptedCheckpoint(); see the store README. The closeDelay option keeps the document open across a quick remount, and the final release keeps a document with an undelivered change open for up to undeliveredCloseDelay. Pass an existing handle only with { manageLifecycle: false }. Every mutation returns a promise; await store.change(...) to handle failures. A change never opens the document, and a store whose document was retired reports the retired status instead of the discarded edit.

External-store hook, shared ownership, StrictMode test, and browser example. See the source examples and integration status.

Shallow composable, SSR/lifecycle tests, and browser example. Pass a getter such as usePeerborneStore(() => props.store) to follow a store prop. See the source examples and integration status.

Svelte 5 readable, server/lifecycle tests, and compiled browser example. See the source examples and integration status.

Experimental collection adapter for ^1.0.0-rc.1.5, tested with 1.0.0-rc.1.5; CRUD, rollback, retired-document failure, and browser exercise. See the source examples and integration status.

Vanilla-API snapshot projection recipe with explicit cleanup. See the source examples and integration status.

Vanilla-API atom projection recipe with explicit cleanup. See the source examples and integration status.

Server-rendered starter and hydrated browser mutation, using webpack. See the source examples and integration status.

Server-rendered starter and hydrated browser mutation, using the Hono Node adapter. See the source examples and integration status.

The React hook uses @peerborne/react/store, requires no context caches, and returns a stable server snapshot. Initialize the node only in the browser. Bindings acquire ownership after mounting; state projections keep the CRDT authoritative rather than creating another mutation/sync authority.