# React Redux
> 譯者注:本庫并不是 Redux 內置,需要單獨安裝。因為一般會和 Redux 一起使用,所以放到一起翻譯
[Redux](https://github.com/reactjs/redux) 官方提供的 React 綁定庫。
具有高效且靈活的特性。
[](https://travis-ci.org/reactjs/react-redux) [](https://www.npmjs.com/package/react-redux)
[](https://www.npmjs.com/package/react-redux)
[](http://www.reactiflux.com)
## 安裝
React Redux 依賴 **React 0.14 或更新版本。**
```
npm install --save react-redux
```
你需要使用 [npm](http://npmjs.com/) 作為包管理工具,配合 (https://webpack.js.org/) 或 [Browserify](http://browserify.org/) 作為模塊打包工具來加載 [CommonJS 模塊](http://webpack.github.io/docs/commonjs.html)。
如果你不想使用 [npm](http://npmjs.com/) 和模塊打包工具,只想打包一個 [UMD](https://github.com/umdjs/umd) 文件來提供 `ReactRedux` 全局變量,那么可以使用 [cdnjs](https://cdnjs.com/libraries/react-redux) 上打包好的版本。但對于非常正式的項目**并不**建議這么做,因為和 Redux 一起工作的大部分庫都只有 [npm](http://npmjs.com/) 才能提供。
## React Native
從 React Native 0.18 發布之后,5.x 版本的 React Redux 能搭配 React Native 一起開發。如果你在使用 5.x 版本的 React Redux 和 React Native 一起開發遇到問題時,請先運行 `npm ls react` 確保你的 `node_modules` 中沒有 React 的復制品。我們建議你使用 `npm@3.x` 來更好地規避這類問題。
如果你使用的是舊版本的 React Native 遇到[這個問題](https://github.com/facebook/react-native/issues/2985),你可能需要繼續使用 [React Redux 3.x 和對應文檔](https://github.com/reactjs/react-redux/tree/v3.1.0)去解決。
## 文檔
- [Redux:搭配 React](http://cn.redux.js.org/docs/basics/UsageWithReact.html)
- [API](api.md#api)
- [`<Provider store>`](api.md#provider-store)
- [`connect([mapStateToProps], [mapDispatchToProps], [mergeProps], [options])`](api.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options)
- [排錯](troubleshooting.md#troubleshooting)
## 它是如何工作的?
我們在 [readthesource 中的一段](https://www.youtube.com/watch?v=VJ38wSFbM3A)有深入討論到。
盡情享用吧!
## License
MIT
- 自述
- 介紹
- 動機
- 核心概念
- 三大原則
- 先前技術
- 學習資源
- 生態系統
- 示例
- 基礎
- 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
- 排錯