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

Method syncClient

packages/lit-query/src/useIsMutating.ts:70–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 4

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

Calls 1

unsubscribeMethod · 0.80

Tested by

no test coverage detected