Reputation: 14793
I guess this is not an intended usecase for mobx.
But maybe someone has already implemented something like that?
Using AsyncStorage
it should be possible to persist and load the stores.
Or is this a sign, that I need somethign other than mobx?
Upvotes: 1
Views: 2382
Reputation: 3096
We use mobx-persist-store. It supports any localStorage like API library, including AsyncStorage
. The repo has great documentation to easily integrate!
Note: mobx-persist-store
is compatible with MobX 6 whereas mobx-persit
hasn't been updated in 5 years and doesn't work with MobX 6
Upvotes: 0
Reputation: 14793
This is the package I was looking for. Works like a charm using AsyncStorage.
Upvotes: 3