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

redux VS modx? #1

Open
carllx opened this issue Aug 17, 2017 · 0 comments
Open

redux VS modx? #1

carllx opened this issue Aug 17, 2017 · 0 comments

Comments

@carllx
Copy link
Owner

carllx commented Aug 17, 2017

均用于state的单向数据流动的管理,开发者对mobx还没有特别大的响应度 目前使用量统计

image

不同点

store :redux是单个store,mobx 可以是多个
action :redux通过action来驱动数据的变化,是必选项,而mobx则为可选项,
数据结构 :redux使用正常的javascript对象,而mobx进行包裹,得到observable数据,
immutable :redux要求数据的不可变形,而mobx则没有要求,
代码量 :mobx👍 代码量小,可以快速完成简单业务开发,
耦合性 :redux 👍 耦合度低,可以便于复用,也方便进行单元测试,
生态环境 :redux 👍的生态环境优于mobx,
使用场景 :mobx 👍适用于简单的业务,快速完成开发;redux适用于复杂场景

mobx 优点

高性能, mobx 的数据依赖始终保持了最小,基于运行时
而如果用 redux,可能一不小心就多订阅或者少订阅了数据。

@carllx carllx added this to the 尝试应用状态库组件管理 milestone Aug 17, 2017
@carllx carllx modified the milestone: 尝试应用状态库组件管理 Aug 17, 2017
@carllx carllx changed the title redux 或者 modx? redux VS modx? Aug 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant