Rxova
Skip to content

createSharedStore

function createSharedStore<S>(
name,
initial,
options?): SharedStore<S>;

State synced across every same-origin tab/window/worker: per-key last-writer-wins version clocks and a hello/snapshot late-joiner handshake. Create at most one store per name per tab (the React package memoizes).

Type Parameter
S extends Record<string, unknown>
ParameterType
namestring
initialS
optionsSharedStoreOptions

SharedStore<S>