QueryStateOptions
type QueryStateOptions = object;Defined in: tanstack/core/options.ts:11
Properties
Section titled “Properties”clearOnDefault?
Section titled “clearOnDefault?”clearOnDefault?: boolean;Defined in: tanstack/core/options.ts:23
Default true: writing a value equal to the default removes the key.
clearOnInvalid?
Section titled “clearOnInvalid?”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?
Section titled “history?”history?: HistoryMode;Defined in: tanstack/core/options.ts:13
replace (default) updates the current entry; push adds history.
limitUrlUpdates?
Section titled “limitUrlUpdates?”limitUrlUpdates?: RateLimit;Defined in: tanstack/core/options.ts:31
Throttle/debounce URL commits. Hook state still updates instantly.
scroll?
Section titled “scroll?”scroll?: boolean;Defined in: tanstack/core/options.ts:21
Map to TanStack resetScroll. Default false (no scroll to top).
shallow?
Section titled “shallow?”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?
Section titled “startTransition?”startTransition?: StartTransitionFn;Defined in: tanstack/core/options.ts:33
Wrap non-shallow navigations in a caller-provided React transition.