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

Method subscribe

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

Source from the content-addressed store, hash-verified

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

Callers 2

onConnectedMethod · 0.95
onQueryClientChangedMethod · 0.95

Calls 1

setObserverResultMethod · 0.95

Tested by

no test coverage detected