* fix(core): do not rely on dataUpdatedAt truthiness
if we want to check for "hasData", we should rather look at state.data and check it against undefined, because it's not possible to have a successful query with data being undefined (since v4)
* chore: fix test that relied on dataUpdatedAt to be set to zero for a query to show up as non-stale
* refactor(*): Import noop function from utils
* Revert "refactor(*): Import noop function from utils"
This reverts commit c76f36fe94.
* refactor(*): Add noop function in each package
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* test(react-query-devtools): add test case for production mode
* chore: update
* chore: update
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
This feature allows the picture-in-picture mode of the devtools to persists through page reloads.
The popup will remain open and will be re-used between page refreshes.
* feat(query-devtools): Adds picture-in-picture mode
This allows the devtools to be detached from the main page and open inside a popup. The components are mounted through a portal onto the new window and all interactions work as expected
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Methods that access a query by its `queryKey` can bypass `find` to avoid performance issues in large caches.
Co-authored-by: Sebastian Kranz <sebastian.kranz@nubix.de>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* Update HydrationStreamProvider + advanced SSR docs
* Implement PR feedback
* refactor: no need for refs if we don't have effects
cleanup ts-expect-error by re-using `win`, which is already `any`
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* refactor(types): make queryKey required on ObserverOptions
we cannot create an observer without a key, because an observer, per definition, watches a certain query by its key
* test: observers need a key
* chore: remove a branch that can't exist
we can't have an observer without a queryKey
* fix: when comparing with shallowEqualObjects, the currentResult must come first
because it doesn't detect length changes
* test: we get another event
* types: you can't set queryKey as default
* a test for undefined queryKey makes no sense
* fix: more type issues
* types: queryKey is also not required for defaultOptions in solid
* fix(core): shallowEqualObjects should return false for objects with different lengths
as we use it for options, and the length of options can change