redux-saga-beginner-tutorial icon indicating copy to clipboard operation
redux-saga-beginner-tutorial copied to clipboard

Delay Counter

Open arosenber opened this issue 9 years ago • 1 comments
trafficstars

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')
  )
}

arosenber avatar Jun 15 '16 18:06 arosenber

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')
  )
}

artarmstrong avatar Sep 14 '16 14:09 artarmstrong