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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
S extends Record<string, unknown> |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name | string |
initial | S |
options | SharedStoreOptions |
Returns
Section titled “Returns”SharedStore<S>