View as Markdown

API reference: @salmonui/data/storage

createKeyValueStateStoragefunction

import { createKeyValueStateStorage } from '@salmonui/data/storage';

Also exported from @salmonui/data.

function createKeyValueStateStorage(store: KeyValueStore, options?: {
    readonly prefix?: string;
}): DataGridStateStorage;

Key-value storage. The store is injected (never localStorage directly). Versions are a counter kept beside the state, so expectedVersion detects a concurrent save from another tab.