簡體   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