title: Maximum update depth exceeded when updating react state on componentDidUpdate
body: <p>What react life cycle should I use to update the local state that I have on my component with information that comes from an axios GET method?</p>
  
  <p>So far I tried <code>componentDidMount</code> but the axios is not completed there, so the prop is empty <code>[]</code>.
  I also tried <code>componentDidUpdate</code>. Surprisingly, the axios GET is completed here, but when I try to update the state, I get the warning for Maximum update depth exceeded.</p>
  
  <p>A sample of my code follows:</p>
  
  <pre><code>componentDidUpdate() {
     const {item} = this.props; // this is coming from axios
  
     this.setState({
          ...
     });
  }
  </code></pre>