API reference › @evolu/common › Store › createStore
function createStore<T>(initialState: T, eq?: Eq<T>): Store<T>;
Defined in: packages/common/src/Store.ts:57
Creates a store with the given initial state. The store encapsulates its
state, which can be read with get and updated with set or update. All
changes are broadcast to subscribers.
By default, state changes are detected using strict equality (===). You can
provide a custom equality function as the second argument.