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

fix typo in ch07 #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Ch07/react-flux-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ ReactDOM.render(<App />, document.getElementById('app'));
export const ADD_TODO = 'ADD_TODO';
```

在這個範例中我們繼承了 Facebook 提供的 Dispatcher API(主要是繼承了 `dispatch`、`register` 和 `subscribe` 的方法),打造自己的 DispatcherClass,當使用者觸發 `handleAction()` 會 `dispatch` 出事件。以下是 `src/dispatch/AppDispatcher.js`:
在這個範例中我們繼承了 Facebook 提供的 Dispatcher API(主要是繼承了 `dispatch`、`register` 和 `subscribe` 的方法),打造自己的 DispatcherClass,當使用者觸發 `handleAction()` 會 `dispatch` 出事件。以下是 `src/dispatcher/AppDispatcher.js`:

```javascript
// Todo app dispatcher with actions responding to both
Expand Down
2 changes: 1 addition & 1 deletion Ch07/react-redux-real-world-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## 前言
上一節我們了解了 Redux 基本的概念和特性後,本章我們要實際動手用 Redux、React Redux 結合 ImmutableJS 開發一個簡單的 Todo 應用。話不多說,那就讓讓我們開始吧!

以下這張圖表示了整個 React Redux App 的資料流程圖(使用者與 View 互動 => dispatch 出 Action => Reducers 依據 action tyoe 分配到對應處理方式,回傳新的 state => 透過 React Redux 傳送給 React,React 重新繪製 View):
以下這張圖表示了整個 React Redux App 的資料流程圖(使用者與 View 互動 => dispatch 出 Action => Reducers 依據 action type 分配到對應處理方式,回傳新的 state => 透過 React Redux 傳送給 React,React 重新繪製 View):

![React Redux](./images/redux-flow.png "React Redux")

Expand Down