- Fixed an issue where queries would not refresh in the background when using suspense
- Caching is now disabled when React Query is used on the server. It is still possible to seed queries using
initialData
during SSR.
- Fixed an edge case where
useIsLoading
would not update or rerender correctly.
- Added
config.refetchIntervalInBackground
option
- Added
config.initialData
option for SSR
- Fix and issue where
setQueryData
would crash when the query does not exist
- Fix and issue where queries would double fetch when using suspense
- Remove nodent runtime from react-async (shaved off 938 bytes!)
- Better esm bundle configuration
- Add
promise.cancel
support to query promises to support request cancellation APIs - Refetch all on window focus should no longer raise unhandled promise rejections
- Fix issue where
document
was not guarded againts in React Native
- Remove orphaned npm dependencies
- Add
@types/react-query
as a dependency for typescript users
- Fix issue where window focus event would try and register in react-native
- Fix issue where variable hashes could contain arrays or similar number/string pairs
- Fix issue where clearing query cache could lead to out of date query states
- Internal cleanup and refactoring
- Added the
clearQueryCache
API function to clear the query cache
- Fixed an issue where passing
config
toReactQueryConfigProvider
would not update the non-hookdefaultContext
- Fixed an issue where
isLoading
would remaintrue
if a query encountered an error after all retries - Fixed regression where
useIsFetching
stopped working
- Fixed an issue where
useMutation().mutate
would not throw an error when failing
- Fixed an issue where falsey query keys would sometimes still fetch
- Added the
useQuery.onSuccess
callback option - Added the
useQuery.onError
callback option
- Added the
prefetchQuery
method - Improved support for Suspense including fetch-as-you-render patterns
- Undocumented
_useQueries
hook has been removed
- The
useReactQueryConfig
hook is now a provider component calledReactQueryConfigProvider