API Reference / @evolu/common / Store / createStore
Function: createStore()
function createStore<T>(initialState): Store<T>;
Defined in: packages/common/src/Store.ts:46
Creates a store with the given initial state. The store encapsulates a
mutable reference to its state, exposed immutably via getState
and updated
via setState
, with changes broadcast to subscribers.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
initialState | T |
Returns
Store
<T
>