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

dva 了解下 #13

Open
ch1oechao opened this issue May 6, 2018 · 0 comments
Open

dva 了解下 #13

ch1oechao opened this issue May 6, 2018 · 0 comments
Labels

Comments

@ch1oechao
Copy link
Owner

支付宝前端应用架构的发展和选择 · Issue #6 · sorrycc/blog · GitHub

理解 Redux

Redux 本身是一个很轻的库,解决 component -> action -> reducer -> state 的单向数据流转问题。

按我理解,他有两个非常突出的特点是:

  • predictable,可预测性
  • 可扩展性

可预测性是由于他大量使用 pure function 和 plain object 等概念(reducer 和 action creator 是 pure function,state 和 action 是 plain object),并且 state 是 immutable 的。这对于项目的稳定性会是非常好的保证。

可扩展性则让我们可以通过 middleware 定制 action 的处理,通过 reducer enhancer 扩展 reducer 等等。从而有了丰富的社区扩展和支持,比如异步处理、Form、router 同步、redu/undo、性能问题(selector)、工具支持。

React + Redux 最佳实践 · Issue #1 · sorrycc/blog

前端变化虽快,但其实一直都围绕这几个概念在转:

URL - 访问什么页面
Data - 显示什么信息
View - 页面长成什么样
Action - 对页面做了什么操作
API Server - Data 数据的来源

dva 介绍 · Issue #1 · dvajs/dva

dva/GettingStarted.md at master · dvajs/dva

12 步 30 分钟,完成用户管理的 CURD 应用 (react+dva+antd) · Issue #18 · sorrycc/blog

dva/README_zh-CN.md at master · dvajs/dva

dvajs/dva-knowledgemap: Knowledge map for dva.

@ch1oechao ch1oechao changed the title dva 了解 dva 了解下 May 6, 2018
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