Replies: 1 comment 2 replies
-
Yeah, async storage might be tricky. Is this already a problem with v4.5.4, or a new thing with v5? |
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
-
In v5 it seems like now we need to manually set the state after store creation
https://zustand.docs.pmnd.rs/migrations/migrating-to-v5#persist-middlware-no-longer-stores-item-at-store-creation
But now I'm a bit confused, if I'm persisting this to async storage, won't the next time the app loads it will set the count again to a random value and overriding the already persisted value?
This is a bit confusing to me.
Beta Was this translation helpful? Give feedback.
All reactions