diff --git a/Ch07/react-redux-real-world-example.md b/Ch07/react-redux-real-world-example.md index 2b7c3b2..fcaaea2 100644 --- a/Ch07/react-redux-real-world-example.md +++ b/Ch07/react-redux-real-world-example.md @@ -192,7 +192,7 @@ export default handleActions({ }, UiState); ``` -雖然 Redux 本身僅會有一個 store,但 redux 本身有提供了 `combineReducers` 可以讓我們切割我們 state 方便維護和管理。實上,state 的規劃也是一們學問,通常需要不斷地實作和工作團隊討論才能找到比較好的方式。不過這邊要注意的是我們改使用了 `redux-immutable` 的 `combineReducers` 這樣可以確保我們的 state 維持在 `Immutable` 的狀態。 +雖然 Redux 本身僅會有一個 store,但 redux 本身有提供了 `combineReducers` 可以讓我們切割我們 state 方便維護和管理。事實上,state 的規劃也是一們學問,通常需要不斷地實作和工作團隊討論才能找到比較好的方式。不過這邊要注意的是我們改使用了 `redux-immutable` 的 `combineReducers` 這樣可以確保我們的 state 維持在 `Immutable` 的狀態。 由於 Redux 官方也沒有特別明確或嚴謹的規範。在一般情況我會將 reducers 分為 `data` 和單純和 UI 有關的 `ui` state。但由於這邊是比較簡單的例子,我們最終只使用到 `src/reducers/data/todoReducers.js`。