Replies: 1 comment 3 replies
-
I don't think that is comparable. The react-query cache lives in the memory of the browser, so if you reload the page, it's gone. Persisting to localstorage is a completely different topic, which react-query currently supports via the experimental webstorage persistor: https://react-query.tanstack.com/plugins/persistQueryClient |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm new to React Query and though I understand the different use cases between Query and Redux, obviously Redux is often used to manage server state, which is something I'm used to doing. As I'm getting more familiar with Query, I'm wondering if there are actual performance gains from using it instead of Redux/Redux-persist. Does the browser cache have benefits over localStorage (Is there a significant difference at all?)? Or is the value of Query just in simplifying managing server state? (I know Query is packed with all sorts of cool features as well, but generally speaking)
Thanks 😊
Beta Was this translation helpful? Give feedback.
All reactions