Replies: 1 comment 2 replies
-
You might be omitting information here. By default, Redux is an in-memory store, so everything being lost on window close is expected behaviour. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Some of my APIs take about 5 seconds (bad performance).
When the user fetches
isFetching
that data usingpollingInterval
and they refresh or close the website before it's done, all cache data will be lost when they come back.Researched:
When
isFetching
and I usewindow.stop()
(in console) to cancel all requests, the cache will not be lost.But I cannot use this for somehow:
Here is my simple code:
Any tricks to prevent that? Or an easy way to cancel all requests before unload?
Alternatively, is there a solution to avoid clearing the data before the next request succeeds?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions