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:104–108 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
102
}
103
104
protected override onUnsubscribe(): void {
105
if
(!this.listeners.size) {
106
this.destroy()
107
}
108
}
109
110
/**
111
* 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