title: Adding user input with state array in React
body: <p>I have an existing array of data in a separate file that I am adding to with user input. The user input I am taking is 3 favorite movies. I am able to receive and push the rest of the data to an existing file. I am not sure if the state array is throwing me off but I am not able to add 3 strings into the array.</p>
  <p>My state is as follows:</p>
  <pre><code>this.state = {
    isActive: false,
    id: 25,
    name: { first: &quot;&quot;, last: &quot;&quot; },
    city: &quot;&quot;,
    country: &quot;&quot;,
    employer: &quot;&quot;,
    title: &quot;&quot;,
    favoriteMovies: ['', '', '']
  };
  </code></pre>
  <p>I am setting the state for user input as follows:</p>
  <pre><code> handleFavoriteMoviesChange = (e) =&gt; {
      this.setState({ favoriteMovies: [...this.state.favoriteMovies, e.target.value]})
   };
  </code></pre>
  <p>These are my 3 input fields:</p>
  <pre><code>    &lt;input
        placeholder=&quot;favorite movies&quot;
        value={this.state.favoriteMovies[0]}
        onChange={this.handleFavoriteMoviesChange}
      /&gt;
      &lt;input
        placeholder=&quot;favorite movies&quot;
        value={this.state.favoriteMovies[1]}
        onChange={this.handleFavoriteMoviesChange}
      /&gt;
      &lt;input
        placeholder=&quot;favorite movies&quot;
        value={this.state.favoriteMovies[2]}
        onChange={this.handleFavoriteMoviesChange}
      /&gt;
  </code></pre>