Skip to content

Commit ca2afa0

Browse files
committed
Update README.md
1 parent 14b5cff commit ca2afa0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ function mapDispatch(dispatch) {
118118
export default connect(mapState, mapDispatch)(CounterContainer);
119119

120120
// You can also pass an object instead of defining `mapDispatch`:
121-
//export default connect(mapState, CounterActionCreators)(CounterContainer);
121+
// export default connect(mapState, CounterActionCreators)(CounterContainer);
122+
123+
// Or you can pass `dispatch` down as a prop if you omit `mapDispatch`:
124+
// export default connect(mapState)(CounterContainer);
122125
```
123126

124127
Whether to put `connect()` call in the same file as the “dumb” component, or separately, is up to you.

0 commit comments

Comments
 (0)