# createDataGridStateApi (@salmonui/data-grid/engine/persistence)

> The createDataGridStateApi function of @salmonui/data-grid/engine/persistence: Builds the state methods of a grid instance. Lives on the ./persistence.js subpath (not in createDataGridApi) so the root entry does not carry the persistence code; renderers compose it into their instance API.

Canonical: https://salmonui.dev/docs/reference/data-grid/engine-persistence/createDataGridStateApi

```ts
import { createDataGridStateApi } from '@salmonui/data-grid/engine/persistence';
```

Entry index: https://salmonui.dev/docs/reference/data-grid/engine-persistence (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data-grid/engine-persistence.md).

## Reference

Kind: function

```ts
function createDataGridStateApi<Row>(engine: DataGridEngine<Row>): DataGridStateApi;
```

Builds the state methods of a grid instance. Lives on the
`./persistence.js` subpath (not in `createDataGridApi`) so the
root entry does not carry the persistence code; renderers compose it into
their instance API.
