@storix-js/sync
v0.3.0
Published
Readme
@storix-js/sync
Cross-tab synchronization plugin for Storix.
Install
npm install @storix-js/core @storix-js/syncUsage
import { createStorix } from '@storix-js/core';
import { syncPlugin } from '@storix-js/sync';
const storix = createStorix({
plugins: [syncPlugin({ debounce: 16, namespaces: ['shell-app'] })]
});The plugin uses BroadcastChannel when available and the storage event only as a fallback, never as a duplicate second transport. Local changes are debounced/coalesced by scope and key, remote-origin changes are not echoed, and cross-namespace delivery requires explicit namespaces configuration.
