We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Flux作为一种设计模式,以单向数据流的方式补充了 React 视图组件。主要分成三个部分:
基于 https://github.com/facebook/flux/tree/2.0.1/examples/flux-todomvc
// https://github.com/facebook/flux/blob/2.0.1/examples/flux-todomvc/js/stores/TodoStore.js#L122 AppDispatcher.register(function(payload) { ... })
// https://github.com/facebook/flux/blob/2.0.1/examples/flux-todomvc/js/components/TodoApp.react.js#L35 getInitialState: function() { return getTodoState(); }, componentDidMount: function() { TodoStore.addChangeListener(this._onChange); },
// https://github.com/facebook/flux/blob/2.0.1/examples/flux-todomvc/js/dispatcher/AppDispatcher.js#L24 this.dispatch({ source: 'VIEW_ACTION', action: action });
// https://github.com/facebook/flux/blob/2.0.1/examples/flux-todomvc/js/stores/TodoStore.js#L126 switch(action.actionType) { ... }
// https://github.com/facebook/flux/blob/2.0.1/examples/flux-todomvc/js/stores/TodoStore.js#L173 TodoStore.emitChange();
// https://github.com/facebook/flux/blob/2.0.1/examples/flux-todomvc/js/components/TodoApp.react.js#L66 _onChange: function() { this.setState(getTodoState()); }
图解 Flux 深入浅出React+Redux 如何理解 Facebook 的 flux 应用架构?
图解 Flux
深入浅出React+Redux
如何理解 Facebook 的 flux 应用架构?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Flux介绍
Flux作为一种设计模式,以单向数据流的方式补充了 React 视图组件。主要分成三个部分:
如何工作?
初始化阶段
数据流产生
结合代码理解
参考
The text was updated successfully, but these errors were encountered: