You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(persistQueryClient): rename isHydrating to isRestoring (#3512)
* fix(devtools): devtools should not import relatively from react-query
* fix(hydration): properly remove unused hydration entry point
hydration moved to the core, and the build entry point was already removed for v4. this is just a proper cleanup.
* fix(persistQueryClient): rename isHydrating to isRestoring
as we currently have no plans to re-use this for useHydrate, it would be confusing to not get true for this value in those cases
* fix(persistQueryClient): document useIsRestoring
* fix: make QueryErrorResetBoundary value stable
we want a constant value for the lifetime of the QueryErrorResetBoundary component; useMemo doesn't guarantee that.
* chore: remove resolutions from package.json
as discussed here: #2688 (comment)
* fix: log message
we don't have a queryKey at this point if a string was used due to how the overloads try to spread things
* Update docs/src/pages/plugins/persistQueryClient.md
- will be called when the initial restore is finished
221
221
- can be used to [resumePausedMutations](../reference/QueryClient#queryclientresumepausedmutations)
222
222
223
+
### useIsRestoring
224
+
225
+
If you are using the `PersistQueryClientProvider`, you can also use the `useIsRestoring` hook alongside it to check if a restore is currently in progress. `useQuery` and friends also check this internally to avoid race conditions between the restore and mounting queries.
0 commit comments