[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Store](https://evolu.dev/docs/api-reference/common/Store) › createStore

```ts
function createStore<T>(initialState: T, eq?: Eq<T>): Store<T>;
```

Defined in: [packages/common/src/Store.ts:57](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/Store.ts#L57)

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.