Skip to content

createQueryStateStore

function createQueryStateStore(config): QueryStateStore;

Defined in: tanstack/core/store.ts:47

Central optimistic store shared by every hook. State updates are applied synchronously so all hooks on the same key stay in sync immediately, while the actual URL commit is rate-limited and merged across same-tick updates.

Parameter Type
config { commit: CommitFn; initialSearch: string | URLSearchParams; processSearchParams?: (params) => void | URLSearchParams; }
config.commit CommitFn
config.initialSearch string | URLSearchParams
config.processSearchParams? (params) => void | URLSearchParams

QueryStateStore