Skip to main content
protected replaceState(next): Promise<State>
Replace the persistent state wholesale (no merging) and return it. Unlike setState, nothing of the previous state survives. onStateChanged does fire — with the new state and the state before the replacement. Connected clients subscribed to the state stream receive the replacement as a full snapshot — no broadcast call needed. Parameters Returns Promise<State> next, as written.