Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(query-core): allow multiple roots to share same QueryClient (#4636)
* fix(query-core): allow multiple roots to share same QueryClient If two roots shared the `QueryClient` instance, then it would never unsubscribe from online/focus manager listeners and would also forever receive duplicate events because the unsubscriber functions would get "forgotten". These issues would be especially noticeable on React Native apps where multiple roots that share the same `QueryClient` are common. * test(QueryClient): Add test for multiple mounts, single unmount Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
- Loading branch information
Showing
2 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters