MCPcopy Create free account
hub / github.com/TanStack/query / reset

Method reset

packages/query-core/src/query.ts:377–380  ·  view source on GitHub ↗

* Resets the query back to its initial state (the state it had when it was * first created, e.g. any `initialData`), destroying it first to cancel any * in-flight fetch.

()

Source from the content-addressed store, hash-verified

375 * in-flight fetch.
376 */
377 reset(): void {
378 this.destroy()
379 this.setState(this.resetState)
380 }
381
382 /**
383 * Returns `true` if the query has at least one observer for which `enabled`

Callers 9

setupDevtoolsFunction · 0.45
PageFunction · 0.45
resetQueriesMethod · 0.45
query.test.tsxFile · 0.45
resetDemoStateMethod · 0.45
resetDemoStateMethod · 0.45

Calls 2

destroyMethod · 0.95
setStateMethod · 0.95

Tested by 1

PageFunction · 0.36