The value I save to storage with persist is delayed when the page refreshes. #2450
Unanswered
aydinvivik
asked this question in
Bug report
Replies: 2 comments 17 replies
-
Related with #2446? |
Beta Was this translation helpful? Give feedback.
1 reply
-
I don't want to go back to redux but I don't understand how to solve such a problem. |
Beta Was this translation helpful? Give feedback.
16 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
When I refresh the page with the value I saved to localstorage with persist, it takes the old value for 1 second and then shows the new value. Is there any way to avoid this 1 second delay?
My example code is below;
use-store.js
use-template.js
component.js
Link to reproduction
https://stackblitz.com/edit/stackblitz-starters-jjsutv?file=app%2Fpage.tsx
Check List
Please do not ask questions in issues.
Please include a minimal reproduction.
Please check this if you're filing an issue regarding TypeScript.
create
is to be used ascreate<T>()(...)
and notcreate<T>(...)
.Beta Was this translation helpful? Give feedback.
All reactions