简体   繁体   中英

Difference between: MobX and Redux.

  • What is difference?
  • What is better library in React or React-Native between MobX and Redux until heavy project from small?

 Redux • Large community, so lots of resources available online • Conceptually simple, clean abstractions • Matured dev tools • functional programming oriented, which offers cool benefits like time travelling, trivial action testing and such • Actions and state changes are very traceable • Rigid paradigm to work in (which is generally speaking a good thing) MobX • Very efficient out of the box (applies side-ways-loading without needing selectors etc) • Very suitable for a state tree that has lot of inter data relationships; the data doesn't need to be normalized to a tree • More OO oriented; you can use classes, instance methods etc..; less new concepts to learn • UI is always kept up to date • no flux like action dispatching required (although you could still do that). On large apps this saves tremendous amounts of boilerplate • actions are really straightforward; you don't have to return new data structures etc. You can just alter objects and the changes are picked up automatically • Functional reactive programming oriented • Simpler to work with async actions

Redux

Mobx

Well the major difference between them is, there's a lot of boilerplate code in Redux while Mobx saves you from that (Internally it does it for you in the best possible and optimal way). Redux gives you a lot of flexibility while defining the flow of data as compared to MobX.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM