Skip to content

Conversation

@gabrielbull
Copy link
Contributor

The reason to add this is to be able to customize the hydrate/dehydrate behaviour on the persistQueryClient. For instance, I don't want a network error to remove a cache entry from my persisted state, I want the client cache to be equivalent to the persisted cache at all time, with dehydrate options, I can achieve this behaviour.

@vercel
Copy link

vercel bot commented Apr 15, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tannerlinsley/react-query/Cv3ytrtxpN1bNpMzKuTLn6pvDRqr
✅ Preview: https://react-query-git-fork-gabrielbull-feature-persist-hydr-092a22.vercel.app

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 59c2bb4:

Sandbox Source
tannerlinsley/react-query: basic Configuration
tannerlinsley/react-query: basic-typescript Configuration

@makirby
Copy link

makirby commented Apr 20, 2021

Was just about to come and add this exact PR!

We're running in prod with our own modified persistQueryClient at the moment would be great to see this merged.

@TkDodo TkDodo merged commit 9626c1b into TanStack:master Apr 28, 2021
@tannerlinsley
Copy link
Member

🎉 This PR is included in version 3.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants