MCPcopy
hub / github.com/TanStack/query / mount

Method mount

packages/query-core/src/queryClient.ts:80–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78 }
79
80 mount(): void {
81 this.#mountCount++
82 if (this.#mountCount !== 1) return
83
84 this.#unsubscribeFocus = focusManager.subscribe(async (focused) => {
85 if (focused) {
86 await this.resumePausedMutations()
87 this.#queryCache.onFocus()
88 }
89 })
90 this.#unsubscribeOnline = onlineManager.subscribe(async (online) => {
91 if (online) {
92 await this.resumePausedMutations()
93 this.#queryCache.onOnline()
94 }
95 })
96 }
97
98 unmount(): void {
99 this.#mountCount--

Callers 15

vueQueryPlugin.tsFile · 0.45
QueryClientProviderFunction · 0.45
provideQueryClientFunction · 0.45
injectDevtoolsPanelFunction · 0.45
withDevtoolsFunction · 0.45
ReactQueryDevtoolsPanelFunction · 0.45
ReactQueryDevtoolsFunction · 0.45
QueryClientProviderFunction · 0.45

Calls 4

resumePausedMutationsMethod · 0.95
subscribeMethod · 0.45
onFocusMethod · 0.45
onOnlineMethod · 0.45

Tested by

no test coverage detected