Skip to content

Commit

Permalink
fix Ch07/react-redux-introduction.md typo
Browse files Browse the repository at this point in the history
  • Loading branch information
b12031106 committed Sep 27, 2016
1 parent 4f87424 commit e5d958b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Ch07/react-redux-introduction.md
Expand Up @@ -91,7 +91,7 @@ store.dispatch({ type: 'DECREMENT' });

1. createStore:`createStore(reducer, [preloadedState], [enhancer])`

我們知道在 Redux 中只會有一個 store。在產生 store 時我們會使用 `createStore` 這個 API 來創建 store。第一個參數放入我們的 `reducer` 或是有多個 `reducers` combine(使用 `combineReducers`)在一起的 `rootRuducers`。第二個參數我們會放入希望預先載入的 `state` 例如:user session 等。第三個參數通常會放入我們想要使用用來增強 Redux 功能的 `middlewares`,若有多個 `middlewares` 的話,通常會使用 `applyMiddleware` 來整合。
我們知道在 Redux 中只會有一個 store。在產生 store 時我們會使用 `createStore` 這個 API 來創建 store。第一個參數放入我們的 `reducer` 或是有多個 `reducers` combine(使用 `combineReducers`)在一起的 `rootReducers`。第二個參數我們會放入希望預先載入的 `state` 例如:user session 等。第三個參數通常會放入我們想要使用用來增強 Redux 功能的 `middlewares`,若有多個 `middlewares` 的話,通常會使用 `applyMiddleware` 來整合。

2. Store

Expand All @@ -102,7 +102,7 @@ store.dispatch({ type: 'DECREMENT' });
- subscribe(listener)
- replaceReducer(nextReducer)

關於 Store 重點是要知道 Redux 只有一個 Sotre 負責存放整個 App 的 State,而唯一能改變 State 的方法只有發送 action。
關於 Store 重點是要知道 Redux 只有一個 Store 負責存放整個 App 的 State,而唯一能改變 State 的方法只有發送 action。

3. combineReducers:`combineReducers(reducers)`

Expand Down

0 comments on commit e5d958b

Please sign in to comment.