Replies: 1 comment 1 reply
-
I basically am looking for a way to persist seeded cache into the key |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I try to maintain a global cache of all the contacts fetched throughout from different places in the application by doing this
And then use this for returning the
initialData
inuseQuery
API callsThis works fine, but I want to persist this data stored in ['contact-cache'] key even with page refresh, how can I do that ?
I tried this, but it didn't work
And then use this exported
queryClient
from here in the functionaddContactsToCacheQuery
, but it didn't store the key 'contact-cache' in localStorage and hence the data got lost after refresh.How can I achieve this ?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions