title: Can't insert state values into an object
body: <p>I have this state in my class:</p>
  <pre><code>this.state = {
    inputValue: &quot;&quot;,
    todos: []
  }
  </code></pre>
  <p>In an arrow function, I am trying to <code>setState</code> in order to put <code>inputValue</code> into <code>todos</code>.</p>
  <pre><code>this.setState({ inputValue: &quot;&quot;, todos: [...this.state.todos, {this.state.todos.length: this.state.inputValue}] })
  </code></pre>
  <p>However, when I try to insert the <code>inputValue</code> and the number, it gives an error. Any help is appreciated as I am new to React.</p>