Can mobx official give some plugins or guide? #2947
-
Redux has many plugins, such as persistence,saga,etc,How to realize similar features in mobx? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Plugins are not a general theme in MobX, as it is a lot less opionionated in its overall architecture. Async action support is build in, so no need for Saga / thunks. Persistence is not provided as that'd require imposing restrictions on what and how things are stored, which doesn't really matter for MobX to work. I think most people do serialisation 'by hand', or use utility libraries dedicated to serialisation, like serializr. If you want an opinionated framework that imposes a lot of restrictions on how things are organised, and provides things like serialization for free in return; that is what mobx-state-tree is for about. |
Beta Was this translation helpful? Give feedback.
-
Check out a mobx persistence library https://github.com/quarrant/mobx-persist-store |
Beta Was this translation helpful? Give feedback.
Check out a mobx persistence library https://github.com/quarrant/mobx-persist-store