-
Is there a way to pick which state should/shouldn't be stored in AsyncStorage? For example there are certain things that I don't want to be stored since they break the flow of the App |
Beta Was this translation helpful? Give feedback.
Answered by
midrizi
May 14, 2023
Replies: 1 comment 1 reply
-
I solved this by using Doing the following in import pick from 'lodash/pick'
_dipsoser = onSnapshot(rootStore, (snapshot) => {
return storage.save(ROOT_STATE_STORAGE_KEY, pick(snapshot, ['episodeStore.favoritesOnly']))
}) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
midrizi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I solved this by using
lodash/pick
function.Doing the following in
setupRootStore
: