redux-saga / redux-saga-beginner-tutorial

Redux/Redux-saga beginner tutorial
MIT License
587 stars 542 forks source link

Delay Counter #8

Open arosenber opened 8 years ago

arosenber commented 8 years ago

Nice tutorial, minor issue with the modification to the component change for the async increment. The tutorial gives this replacement, losing the value={store.getState()} which was necessary for display purposes.

function render() {
  ReactDOM.render(
    <Counter
      onIncrementAsync={() => action('INCREMENT_ASYNC')}
    />,
    document.getElementById('root')
  )
}
artarmstrong commented 8 years ago

I believe the change in the tutorial should be replaced with this since you are not supposed to take out the other variables but only add that to the bottom of the list. Heres what the updated code should look like in the tutorial:

function render() {
  ReactDOM.render(
    <Counter
      ...
      onIncrementAsync={() => action('INCREMENT_ASYNC')}
    />,
    document.getElementById('root')
  )
}