Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
huangtengfei committed May 25, 2016
1 parent aa4183b commit bc96830
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ render(

### Connect

`Connect` 用来将包装好的组件连接到 Redux 。它最多接收 [4 个可选参数][2],返回一个函数,用这个函数接收一个组件类作为参数,最后返回一个和 Redux 关联起来的新组件,形如:
`Connect` 用来将包装好的组件连接到 Redux,从 Redux Store 接收到全局的 state,然后返回组件中需要的 props 。它最多接收 [4 个可选参数][2],返回一个函数,用这个函数接收一个组件类作为参数,最后返回一个和 Redux 关联起来的新组件,形如:

```javascript
class App extends Component { ... }
Expand Down Expand Up @@ -253,4 +253,4 @@ this.setState({ myVal: 'newVal'}, function() {
[2]: https://github.com/reactjs/react-redux/blob/master/docs/api.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options
[3]: https://facebook.github.io/react/docs/component-api.html
[4]: http://stackoverflow.com/questions/30782948/why-calling-react-setstate-method-doesnt-mutate-the-state-immediately
[5]: http://cn.redux.js.org/index.html
[5]: http://cn.redux.js.org/index.html

0 comments on commit bc96830

Please sign in to comment.