title: Remove first item of array in react state
body: <p>I know how to do this but trying this way and not sure why it wont work?</p>
  
  <pre><code>  drawCard = () =&gt; {
      const deck = this.state.cards;
      deck.shift();
      console.log(deck, 'deck'); //this is correctly logging one less everytime
      this.setState({cards: deck})
    }
  </code></pre>
  
  <p>cards is just an of objects</p>
  
  <p>so even though the function is being called and the console log is working, why is it not updating state?</p>
  
  <p>(console.log(state.cards.length) always returns 3)</p>