Skip to content

QueryStateOptions

type QueryStateOptions = object;

Defined in: tanstack/core/options.ts:11

clearOnDefault?: boolean;

Defined in: tanstack/core/options.ts:23

Default true: writing a value equal to the default removes the key.


clearOnInvalid?: boolean;

Defined in: tanstack/core/options.ts:29

Default true: a key whose raw value in the URL fails to parse (stale or tampered garbage, e.g. ?tz=Nope) is stripped from the URL on read, so it resolves cleanly to the default instead of leaving junk in the address bar.


history?: HistoryMode;

Defined in: tanstack/core/options.ts:13

replace (default) updates the current entry; push adds history.


limitUrlUpdates?: RateLimit;

Defined in: tanstack/core/options.ts:31

Throttle/debounce URL commits. Hook state still updates instantly.


scroll?: boolean;

Defined in: tanstack/core/options.ts:21

Map to TanStack resetScroll. Default false (no scroll to top).


shallow?: boolean;

Defined in: tanstack/core/options.ts:19

true (default) updates the URL via the History API only — route loaders and SSR do not run. false routes the update through TanStack Router navigation so loaders/validation/pending state participate.


startTransition?: StartTransitionFn;

Defined in: tanstack/core/options.ts:33

Wrap non-shallow navigations in a caller-provided React transition.