title: Correct modification of state arrays in React.js
body: <p>I want to add an element to the end of a <code>state</code> array, is this the correct way to do it?</p>
  <pre><code>this.state.arrayvar.push(newelement);
  this.setState({ arrayvar:this.state.arrayvar });
  </code></pre>
  <p>I'm concerned that modifying the array in-place with <code>push</code> might cause trouble - is it safe?</p>
  <p>The alternative of making a copy of the array, and <code>setState</code>ing that seems wasteful.</p>