Skip to content

Commit 1769d24

Browse files
Doc : Update ownProps example (#1655)
This changes can make more clear understanding to future reader.
1 parent 1df5622 commit 1769d24

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/using-react-redux/connect-extracting-data-with-mapStateToProps.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ You may define the function with a second argument, `ownProps`, if your componen
5757

5858
function mapStateToProps(state, ownProps) {
5959
const { visibilityFilter } = state
60+
// ownProps would look like { "id" : 123 }
6061
const { id } = ownProps
6162
const todo = getTodoById(state, id)
6263

@@ -65,7 +66,7 @@ function mapStateToProps(state, ownProps) {
6566
}
6667

6768
// Later, in your application, a parent component renders:
68-
;<ConnectedTodo id={123} />
69+
<ConnectedTodo id={123} />
6970
// and your component receives props.id, props.todo, and props.visibilityFilter
7071
```
7172

0 commit comments

Comments
 (0)