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

Method willUpdate

examples/lit/playground/src/main.ts:44–57  ·  view source on GitHub ↗
(changedProperties: PropertyValues)

Source from the content-addressed store, hash-verified

42 }
43
44 protected override willUpdate(changedProperties: PropertyValues) {
45 serverConfig.errorRate = this.localErrorRate
46 serverConfig.queryTimeMin = this.localFetchTimeMin
47 serverConfig.queryTimeMax = this.localFetchTimeMax
48
49 if (changedProperties.has('staleTime') || changedProperties.has('gcTime')) {
50 queryClient.setDefaultOptions({
51 queries: {
52 staleTime: this.staleTime,
53 gcTime: this.gcTime,
54 },
55 })
56 }
57 }
58
59 private onNumberChange(event: Event, setValue: (value: number) => void) {
60 const value = (event.currentTarget as HTMLInputElement).valueAsNumber

Callers

nothing calls this directly

Calls 1

setDefaultOptionsMethod · 0.45

Tested by

no test coverage detected