Skip to content

Commit

Permalink
fix log message hint for ownProps on map function (#1056)
Browse files Browse the repository at this point in the history
- mapStateToProps with default value for ownProps parameter
- ownProps always be the default value
  • Loading branch information
carloluis authored and markerikson committed Oct 21, 2018
1 parent 0d9325e commit 1ab1596
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,10 @@ function mapStateToProps(state) {
```js
const mapStateToProps = (state, ownProps = {}) => {
console.log(state); // state
console.log(ownProps); // undefined
console.log(ownProps); // {}
}
```

Functions with no mandatory parameters or two parameters **will receive** `ownProps`.
```js
const mapStateToProps = (state, ownProps) => {
Expand Down

0 comments on commit 1ab1596

Please sign in to comment.