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

Method mount

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

Source from the content-addressed store, hash-verified

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

Callers 15

PreactQueryDevtoolsFunction · 0.45
PreactQueryDevtoolsPanelFunction · 0.45
mountClientMethod · 0.45
vueQueryPlugin.tsFile · 0.45
QueryClientProviderFunction · 0.45
provideQueryClientFunction · 0.45
injectDevtoolsPanelFunction · 0.45
withDevtoolsFunction · 0.45
QueryClientProviderFunction · 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