繁体   English   中英

区别:MobX 和 Redux。

[英]Difference between: MobX and Redux.

  • 什么是区别?
  • 什么是 React 或 React-Native 中 MobX 和 Redux 之间更好的库,直到从小到大的重项目?

 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 将您从这些代码中解救出来(在内部,它以最佳和最佳的方式为您完成)。 与 MobX 相比,Redux 在定义数据流时为您提供了很大的灵活性。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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