MMKV Storage ID Update on Auth Change #454
Unanswered
markmccoid
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a react native app that allows multiple users. When one user logs in I want to persist their data to a unique MMKV id for their user.
I have been having a hard time figuring out how to do this. I believe I have it set up to store to each users unique MMKV id, however, when I log out and log into a new user, the last users observable still has their state in it.
When I try to clear the state before logging in the new user, I either clear the MMKV area for the users id or the observable doesn't update.
I have a function that runs whenever my current user changes and it updates the variable where the observable is stored:
Any hints or obvious things I'm doing incorrectly? Thanks!!
Beta Was this translation helpful? Give feedback.
All reactions