# createLocalDataSource (@salmonui/data-grid/engine)

> The createLocalDataSource function of @salmonui/data-grid/engine: In-memory data source (mode: 'local'). Rows are held by reference and the array is treated as immutable: every change produces a new array and one event. The engine runs every pipeline stage locally.

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

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

Also exported from `@salmonui/data-grid`.

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

## Reference

Kind: function

```ts
function createLocalDataSource<Row>(rows?: readonly Row[], options?: LocalDataSourceOptions<Row>): LocalDataSource<Row>;
```

In-memory data source (`mode: 'local'`). Rows are held by reference and the
array is treated as immutable: every change produces a new array and one
event. The engine runs every pipeline stage locally.
