MCPcopy Index your code
hub / github.com/TanStack/query / setState

Method setState

packages/query-core/src/query.ts:245–250  ·  view source on GitHub ↗
(
    state: Partial<QueryState<TData, TError>>,
    setStateOptions?: SetStateOptions,
  )

Source from the content-addressed store, hash-verified

243 }
244
245 setState(
246 state: Partial<QueryState<TData, TError>>,
247 setStateOptions?: SetStateOptions,
248 ): void {
249 this.#dispatch({ type: 'setState', state, setStateOptions })
250 }
251
252 cancel(options?: CancelOptions): Promise<void> {
253 const promise = this.#retryer?.promise

Callers 11

resetMethod · 0.95
fetchMethod · 0.95
setupDevtoolsFunction · 0.80
triggerErrorFunction · 0.80
QueryDetailsFunction · 0.80
persisterFnFunction · 0.80
hydrateFunction · 0.80
streamedQueryFunction · 0.80
broadcastQueryClientFunction · 0.80

Calls 1

#dispatchMethod · 0.95

Tested by

no test coverage detected