Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TanStack/query
/ onUnsubscribe
Method
onUnsubscribe
packages/query-core/src/queriesObserver.ts:100–104 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
98
}
99
100
protected override onUnsubscribe(): void {
101
if
(!this.listeners.size) {
102
this.destroy()
103
}
104
}
105
106
/**
107
* Stops observing all queries: clears all listeners and destroys every
Callers
nothing calls this directly
Calls
1
destroy
Method · 0.95
Tested by
no test coverage detected