title: React and Redux - ComponentDidUpdate Async?
body: <p>I'm learning React and Redux, I'm doing a basic ToDo list.</p>
  
  <p>I'm having an issue with the <code>componentDidUpdate</code>.</p>
  
  <p>I delete a row over a <code>dispatch</code> to a redux action, and then in the componentDidUpdate I wait for the change in the props like:</p>
  
  <pre><code>componentDidUpdate = () =&gt; {
    if (this.props.todoDelted) {
      this.refreshTodoList()
    } 
  }
  </code></pre>
  
  <p>The problem is, that there's another <code>props</code> that are being updated too, and <code>todoDelted</code> is the first to update. When I compare with <code>prevProps</code> todoDeleted is always <code>undefined</code>, since it updated just once.</p>
  
  <p>How can I run <code>this.refreshTodoList()</code> just once and not every time a prop is updated?</p>