MCPcopy Index your code
hub / github.com/TanStack/query / onSubscribe

Method onSubscribe

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

#onUpdateMethod · 0.95
subscribeMethod · 0.45

Tested by

no test coverage detected