Skip to content

Commit 1ab1596

Browse files
carloluismarkerikson
authored andcommitted
fix log message hint for ownProps on map function (#1056)
- mapStateToProps with default value for ownProps parameter - ownProps always be the default value
1 parent 0d9325e commit 1ab1596

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,10 @@ function mapStateToProps(state) {
102102
```js
103103
const mapStateToProps = (state, ownProps = {}) => {
104104
console.log(state); // state
105-
console.log(ownProps); // undefined
105+
console.log(ownProps); // {}
106106
}
107107
```
108+
108109
Functions with no mandatory parameters or two parameters **will receive** `ownProps`.
109110
```js
110111
const mapStateToProps = (state, ownProps) => {

0 commit comments

Comments
 (0)