Persist all data but Sync only some values #451
Replies: 1 comment 1 reply
-
That is possible. For instance to save only local you can use this: export const usersStore = observable<{ user?: User}>({
user: undefined,
});
// Persist the observable to the named key of the global persist plugin
syncObservable(usersStore, {
persist: {
name: "only-local-persist",
plugin: PersistLocalStorage
} And you can sync manually all the local data when the user signup. The issue with this is to make more code logic to handle different ways to save data. I think the best solution isFirst Step
Second Step
|
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm try to figure out if that is possible to do:
Beta Was this translation helpful? Give feedback.
All reactions