Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can mobx persist state (a la redux)? #390

tnrich opened this Issue Jul 7, 2016 · 5 comments


None yet
5 participants
Copy link

tnrich commented Jul 7, 2016

Hey there,

Just had a question I didn't see an answer to when searching the issues/google: does mobx have a way to persist state between page refreshes like redux devtools persistState functionality?



This comment has been minimized.

Copy link

mweststrate commented Jul 15, 2016


MobX doesn't provide a standard app architecture that prescribes how to organize the state, so the answer is, it depends. If you use a plain object tree it is pretty simple, if you use a plain object graph mobx.toJSON will suffice as well. If you use compex objects (classes / constructores), there is currently the serializr package in development that provides the tools to (de) serialize complex object graphs. But existing ORM libraries might help as well.

Usually setting an efficient serialization mechanism yourself is also not too hard, see for example

I hope that helps!


This comment has been minimized.

Copy link

haikyuu commented Jan 2, 2017

You might want to take a look at


This comment has been minimized.

Copy link

sixman9 commented May 16, 2018

As of May 2018, it looks like 'mobx-store' has had no updates for 2 years and was archived on Github, so, can I instead suggest:


This comment has been minimized.

Copy link

pdeva commented Mar 4, 2019

@sixman9 even mobx-persist seems to be dead.
surprising there is no good solutions out there


This comment has been minimized.

Copy link

mweststrate commented Mar 4, 2019

@pdeva please refrain from comment on issues that are closed for over a year, most people won't see it.

Standardized persisting solutinos are the serializable and mobx-state-tree package. But if you limit your self (like in Redux) to pure data trees to store the data, you don't even need that, and a simple JSON.stringify(state) will do. For further questions, please open a new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.