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

Method optionalRemove

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

Source from the content-addressed store, hash-verified

374 }
375
376 protected override optionalRemove() {
377 if (!this.observers.length && this.state.fetchStatus === 'idle') {
378 this.#cache.remove(this)
379 }
380 }
381
382 /**
383 * Writes new data to the query and marks it as successfully fetched.

Callers 1

scheduleGcFunction · 0.45

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected