Skip to content

createThingStoreSync

createThingStoreSync<TState>(initialState, options?): ThingAdapter<TState>

Defined in: index.ts:135

Construct a thi.ng/atom-backed store synchronously. Suitable for SSR — call from inside a render function or useMemo without awaiting.

Returns the concrete ThingAdapter<TState> so consumers retain access to undo / redo / canUndo / canRedo / clearHistory. StoreProvider accepts it since ThingAdapter implements Store<TState>.

Type ParameterDefault type
TStateany
ParameterType
initialStateTState
options?ThingAdapterOptions

ThingAdapter<TState>