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

Method subscribe

packages/lit-query/src/createQueryController.ts:209–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

207 }
208
209 private subscribe(): void {
210 if (!this.observer) {
211 return
212 }
213
214 if (this.unsubscribe) {
215 return
216 }
217
218 this.unsubscribe = this.observer.subscribe((next) => {
219 this.setObserverResult(next)
220 })
221 }
222
223 private unsubscribeObserver(): void {
224 this.unsubscribe?.()

Callers 2

onConnectedMethod · 0.95
onQueryClientChangedMethod · 0.95

Calls 1

setObserverResultMethod · 0.95

Tested by

no test coverage detected