LocalStorage persister not working as expected #9149
Unanswered
GarrisonBates
asked this question in
Q&A
Replies: 1 comment 3 replies
-
not that I know of |
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
-
I'm using a localStorage persister:
Which wraps my whole app.
To my understanding,
networkMode: 'offlineFirst'
is automatically set when using a persister. So I expected that going offline and firing a query that's already persisted would result in the data being hydrated from localStorage and displayed.But either way, even when I explicitly set
networkMode: 'offlineFirst'
, the behavior's the same. An error is propagated and the entry is entirely deleted from localStorage.Is this the correct behavior, or is it possible that I have something configured incorrectly? I read through the docs on persisters and networkMode, and based on what I read this behavior is surprising to me, so I'm wondering if something's off.
Beta Was this translation helpful? Give feedback.
All reactions