# Redux 常見問題
## 目錄
- **綜合**
- [何時學習 Redux ?](/docs/faq/General.md#general-when-to-learn)
- [何時使用 Redux ?](/faq/General#general-when-to-use)
- [Redux 只能搭配 React 使用?](/faq/General#general-only-react)
- [Redux 需要特殊的編譯工具支持嗎?](/faq/General#general-build-tools)
- **Reducer**
- [如何在 reducer 之間共享 state ? combineReducers 是必須的嗎?](/faq/Reducers#reducers-share-state)
- [處理 action 必須用 switch 語句嗎?](/faq/Reducers#reducers-use-switch)
- **組織 State**
- [必須將所有 state 都維護在 Redux 中嗎? 可以用 React 的 setState() 方法嗎?](/faq/OrganizingState#organizing-state-only-redux-state)
- [可以將 store 的 state 設置為函數、promise 或者其它非序列化值嗎?](/faq/OrganizingState#organizing-state-non-serializable)
- [如何在 state 中組織嵌套及重復數據?](/faq/OrganizingState#organizing-state-nested-data)
- **創建 Store**
- [可以創建多個 store 嗎,應該這么做嗎?能在組件中直接引用 store 并使用嗎?](/faq/StoreSetup#store-setup-multiple-stores)
- [在 store enhancer 中可以存在多個 middleware 鏈嗎? 在 middleware 方法中,next 和 dispatch 之間區別是什么?](/faq/StoreSetup#store-setup-middleware-chains)
- [怎樣只訂閱 state 的一部分變更?如何將分發的 action 作為訂閱的一部分?](/faq/StoreSetup#store-setup-subscriptions)
- **Action**
- [為何 type 必須是字符串,或者至少可以被序列化? 為什么 action 類型應該作為常量?](/faq/Actions#actions-string-constants)
- [是否存在 reducer 和 action 之間的一對一映射?](/faq/Actions#actions-reducer-mappings)
- [怎樣表示類似 AJAX 請求的 “副作用”?為何需要 “action 創建函數”、“thunks” 以及 “middleware” 類似的東西去處理異步行為?](/faq/Actions#actions-side-effects)
- [是否應該在 action 創建函數中連續分發多個 action?](/faq/Actions#actions-multiple-actions)
- **代碼結構**
- [文件結構應該是什么樣?項目中該如何對 action 創建函數和 reducer 分組? selector 又該放在哪里?](/faq/CodeStructure#structure-file-structure)
- [如何將邏輯在 reducer 和 action 創建函數之間劃分? “業務邏輯” 應該放在哪里?](/faq/CodeStructure#structure-business-logic)
- [為何應該使用 action 創建函數?](/docs/faq/CodeStructure.md#structure-action-creators)
- **不可變數據**
- [Immutability(數據不可變性)的好處是什么?](/docs/faq/ImmutableData.md#benefits-of-immutability)
- [為什么 Redux 要求數據不可變?](/docs/faq/ImmutableData.md#why-is-immutability-required)
- [我一定要用 Immutable.JS 嗎?](/docs/faq/ImmutableData.md#do-i-have-to-use-immutable-js)
- [用 ES6 實現數據不可變的一些問題](/docs/faq/ImmutableData.md#issues-with-es6-for-immutable-ops)
- **在 Redux 中使用 Immutable.JS**
- [為什么需要使用像 Immutable.JS 這種用于實現數據不可變的庫?](/docs/recipes/UsingImmutableJS.md#why-use-immutable-library)
- [為什么要選擇 Immutable.JS 作為實現數據不可變的庫?](/docs/recipes/UsingImmutableJS.md#why-choose-immutable-js)
- [使用 Immutable.JS 的一些問題](/docs/recipes/UsingImmutableJS.md#issues-with-immutable-js)
- [Immutable.JS 是否值得一用?](/docs/recipes/UsingImmutableJS.md#is-immutable-js-worth-effort)
- [在 Redux 中使用 Immutable.JS 的一些最佳實踐](/docs/recipes/UsingImmutableJS.md#immutable-js-best-practices)
- **代碼結構**
?- [我的項目結構應該是怎么樣的?在項目中應該如何組織 action 創建函數和 reducer? 選擇器(selector)應該放在哪里?](/docs/faq/CodeStructure.md#structure-file-structure)
- [如何分離 reducer 與 action 創建函數之間的邏輯?業務邏輯應該放在哪里?](/docs/faq/CodeStructure.md#structure-business-logic)
- [為什么需要使用 action 創建函數?](/docs/faq/CodeStructure.md#structure-action-creators)
- **性能**
- [考慮到性能和架構, Redux “可擴展性” 如何?](/faq/Performance#performance-scaling)
- [每個 action 都調用 “所有的 reducer” 會不會很慢?](/faq/Performance#performance-all-reducers)
- [在 reducer 中必須對 state 進行深拷貝嗎?拷貝 state 不會很慢嗎?](/faq/Performance#performance-clone-state)
- [怎樣減少 store 更新事件的數量?](/faq/Performance#performance-update-events)
- [僅有 “一個 state 樹” 會引發內存問題嗎?分發多個 action 會占用內存空間嗎?](/faq/Performance#performance-state-memory)
- [緩存遠程數據會導致內存問題嗎?](/docs/faq/Performance.md#performance-cache-memory)
- **React Redux**
- [為何組件沒有被重新渲染、或者 mapStateToProps 沒有運行?](/faq/ReactRedux#react-not-rerendering)
- [為何組件頻繁的重新渲染?](/faq/ReactRedux#react-rendering-too-often)
- [怎樣使 mapStateToProps 執行更快?](/faq/ReactRedux#react-mapstate-speed)
- [為何不在被連接的組件中使用 this.props.dispatch ?](/faq/ReactRedux#react-props-dispatch)
- [應該只連接到頂層組件嗎,或者可以在組件樹中連接到不同組件嗎?](/faq/ReactRedux#react-multiple-components)
- **其它**
- [有 “真實存在” 且很龐大的 Redux 項目嗎?](#miscellaneous-real-projects)
- [如何在 Redux 中實現鑒權?](#miscellaneous-authentication)
- 自述
- 介紹
- 動機
- 核心概念
- 三大原則
- 先前技術
- 學習資源
- 生態系統
- 示例
- 基礎
- Action
- Reducer
- Store
- 數據流
- 搭配 React
- 示例:Todo List
- 高級
- 異步 Action
- 異步數據流
- Middleware
- 搭配 React Router
- 示例:Reddit API
- 下一步
- 技巧
- 配置 Store
- 遷移到 Redux
- 使用對象展開運算符
- 減少樣板代碼
- 服務端渲染
- 編寫測試
- 計算衍生數據
- 實現撤銷重做
- 子應用隔離
- 組織 Reducer
- Reducer 基礎概念
- Reducer 基礎結構
- Reducer 邏輯拆分
- Reducer 重構示例
- combineReducers 用法
- combineReducers 進階
- State 范式化
- 管理范式化數據
- Reducer 邏輯復用
- 不可變更新模式
- 初始化 State
- 結合 Immutable.JS 使用 Redux
- 常見問題
- 綜合
- Reducer
- 組織 State
- 創建 Store
- Action
- 不可變數據
- 代碼結構
- 性能
- 設計哲學
- React Redux
- 其它
- 排錯
- 詞匯表
- API 文檔
- createStore
- Store
- combineReducers
- applyMiddleware
- bindActionCreators
- compose
- react-redux 文檔
- API
- 排錯