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

Function setResult

packages/lit-query/src/controllers/BaseController.ts:175–184  ·  view source on GitHub ↗

* Stores a new result and requests a host update, unless it is the same * result or the host is already updating. * @param next - The new result.

(next: TResult)

Source from the content-addressed store, hash-verified

173 * @param next - The new result.
174 */
175 protected setResult(next: TResult): void {
176 if (Object.is(this.result, next)) {
177 return
178 }
179
180 this.result = next
181 if (!this.isHostUpdating) {
182 this.queueUpdate()
183 }
184 }
185
186 /**
187 * The latest result of the controller.

Callers 4

PageFunction · 0.85
PageFunction · 0.85
useMutationStateFunction · 0.85
PageFunction · 0.85

Calls

no outgoing calls

Tested by 3

PageFunction · 0.68
PageFunction · 0.68
PageFunction · 0.68