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

Method syncClient

packages/lit-query/src/useIsFetching.ts:74–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72 }
73
74 private syncClient(): boolean {
75 const nextClient = this.tryGetQueryClient()
76 if (!nextClient) {
77 this.unsubscribe?.()
78 this.unsubscribe = undefined
79 this.queryClient = undefined
80 return false
81 }
82
83 if (nextClient === this.queryClient) {
84 return true
85 }
86
87 this.unsubscribe?.()
88 this.unsubscribe = undefined
89 this.queryClient = nextClient
90 return true
91 }
92
93 private subscribe(): void {
94 if (!this.queryClient) {

Callers 4

onConnectedMethod · 0.95
onDisconnectedMethod · 0.95
onHostUpdateMethod · 0.95
onQueryClientChangedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected