@laboverwire/stitch

Reactive state synchronization library bridging an in-memory store, IndexedDB persistence, and MQTT-based remote sync.
1,156 2
Install
npm install @laboverwire/stitch
Latest Version:0.6.3
Vue:3
License:Apache-2.0
Last Updated:Oct 21, 2026
Links: GitHub  ·  npm
Maintainer: laboverwire

@laboverwire/stitch

Reactive state synchronization for React and Vue. A thin, framework-agnostic binding layer over @laboverwire/stitch-wasm — a Rust/WASM package that owns the in-memory store, IndexedDB persistence, and MQTT-based remote sync. This package wraps that WASM Store in a small adapter and ships React and Vue 3 bindings on top; all store, sync, persistence, and offline-queue logic lives inside the WASM.

npm install @laboverwire/stitch
import { createStore } from '@laboverwire/stitch';

const store = createStore<Schema>(config, {
  persistence: { dbName: 'my-app' },
  remote: { url: 'wss://mqtt.example.com', ticket: await fetchAuthTicket() },
});

await store.initialize();
await store.replaceScope('project-abc');

const tasks = store.getSnapshot('task', 'project-abc');

remote.url is a ws:///wss:// MQTT endpoint. Pass ticket (a JWT) for MQTT v5 enhanced auth, or username/password for classic password auth. A persistence.passphrase enables AES-GCM encryption of the IndexedDB store.

Documentation

examples/ contains runnable vanilla-TS, React, and Vue apps that double as reference implementations.

License

Apache-2.0 — see LICENSE.

Related Packages

@korijn/vue-store

Lightweight Vue 3 composition API-compatible store pattern library

2,397 24
nanostores

A tiny (351 bytes) state manager for React/Preact/Vue/Svelte with many atomic tr...

202,069,944 7,630
nanostores-cjs

A tiny (266 bytes) state manager for React/Preact/Vue/Svelte with many atomic tr...

11,648 7,630

Version History

Version Released License
0.6.3 Apache-2.0
0.6.2 Apache-2.0
0.6.1 Apache-2.0
0.6.0 Apache-2.0
0.5.1 Apache-2.0