- state is a reference to the component state at the time the change is being applied
- use if the next state depends on the current state
this.setState((state, props) => {
return {counter: state.counter + props.step};
})
this.setState((state, props) => {
return {counter: state.counter + props.step};
})