Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Aug 7, 2015
1 parent a648443 commit 99530fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Performant and flexible.
- [Quick Start](#quick-start)
- [API](#api)
- [`<Provider store>`](#provider-store)
- [`connect([mapState], [mapDispatch], [mergeProps])(Component)`](#connectmapstate-mapdispatch-mergeprops-component)
- [`connect([mapState], [mapDispatch], [mergeProps])(Component)`](#connectmapstate-mapdispatch-mergeprops)
- [License](#license)

## React Native
Expand Down Expand Up @@ -212,7 +212,7 @@ React.render(
);
```

### `connect([mapState], [mapDispatch], [mergeProps])(Component)`
### `connect([mapState], [mapDispatch], [mergeProps])`

Connects a React component to a Redux store.

Expand All @@ -230,6 +230,8 @@ A React component class that injects state and action creators into your compone

#### Remarks

* It needs to be invoked two times. First time with its arguments described above, and second time, with the component: `connect(mapState, mapDispatch, mergeProps)(MyComponent)`.

* The `mapState` function takes a single argument of the entire Redux store’s state and returns an object to be passed as props. It is often called a **selector**. Use [reselect](https://github.com/faassen/reselect) to efficiently compose selectors and [compute derived data](http://gaearon.github.io/redux/docs/recipes/ComputingDerivedData.html).

* **To use `connect()`, the root component of your app must be wrapped into `<Provider>{() => ... }</Provider>` before being rendered.**
Expand Down

0 comments on commit 99530fa

Please sign in to comment.