title: setState in nested arrays in react
body: <p>I have a React state object with two arrays inside of it. </p>
  
  <pre><code>this.state = {
    data2: {
      nodes: [{id: 'input'}],
      links: []
    },
  };
  </code></pre>
  
  <p>I want to add new values to these arrays after some user action but I haven't figured out the right way. So far I have attempted something like this:</p>
  
  <pre><code>this.setState([...this.state.data2, {nodes: [...this.state.nodes,{ id: 'input2'}]}]);
  </code></pre>
  
  <p>Any ideas on how should I implement this? </p>