Skip to content

Commit c628e0e

Browse files
committed
Update README.md
1 parent 0bbb126 commit c628e0e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@ It is advisable that only top-level components of your app (such as route handle
6363

6464
### “Dumb” component is unaware of Redux
6565

66-
Let’s say we have a `<Counter />` “dumb” component with a number `counter` prop, and an `increment` function prop that it will call when user presses an “Increment” button:
66+
Let’s say we have a `<Counter />` “dumb” component with a number `value` prop, and an `onIncrement` function prop that it will call when user presses an “Increment” button:
6767

6868
```js
6969
import { Component } from 'react';
7070

7171
export default class Counter extends Component {
7272
render() {
7373
return (
74-
<button onClick={this.props.increment}>
75-
{this.props.counter}
74+
<button onClick={this.props.onIncrement}>
75+
{this.props.value}
7676
</button>
7777
);
7878
}
@@ -97,14 +97,14 @@ import { increment } from '../actionsCreators';
9797
// Which part of the Redux global state does our component want to receive as props?
9898
function mapState(state) {
9999
return {
100-
counter: state.counter
100+
value: state.counter
101101
};
102102
}
103103

104104
// Which action creators does it want to receive by props?
105105
function mapDispatch(dispatch) {
106106
return {
107-
increment: () => dispatch(increment())
107+
onIncrement: () => dispatch(increment())
108108
};
109109
}
110110

0 commit comments

Comments
 (0)