makeInMemoryAdapter
makeInMemoryAdapter(
options):Adapter
Defined in: packages/@livestore/adapter-web/src/in-memory/in-memory-adapter.ts:75
Create a web-only in-memory LiveStore adapter.
- Runs entirely in memory: fast, zero I/O, great for tests, sandboxes, or ephemeral sessions.
- Works across browser execution contexts: Window, WebWorker, SharedWorker, and ServiceWorker.
- DevTools: to inspect this adapter from the browser DevTools, provide a
sharedWorkerinoptions.devtools. (The shared worker is used to bridge the DevTools UI to the running session.) - No persistence support: nothing is written to OPFS/IndexedDB/localStorage.
importSnapshotcan bootstrap initial state only; subsequent changes are not persisted anywhere.
Parameters
Section titled “Parameters”options
Section titled “options”InMemoryAdapterOptions = {}
Returns
Section titled “Returns”Adapter