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

Method onSubscribe

packages/query-core/src/queriesObserver.ts:65–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63 }
64
65 protected onSubscribe(): void {
66 if (this.listeners.size === 1) {
67 this.#observers.forEach((observer) => {
68 observer.subscribe((result) => {
69 this.#onUpdate(observer, result)
70 })
71 })
72 }
73 }
74
75 protected onUnsubscribe(): void {
76 if (!this.listeners.size) {

Callers

nothing calls this directly

Calls 2

#onUpdateMethod · 0.95
subscribeMethod · 0.45

Tested by

no test coverage detected