title: How to pass array data to state from a form?
body: <p>I am new on react js
  I have this state:</p>
  
  <pre><code>state = {
      protocol_number: this.year.toString()
          +Math.floor(Math.pow(10,5)
          +Math.random()*Math.pow(9, 6)).toString(),
      ticket_date: this.full_date,
      company_name: '',
      nameError: '',
      trading_name: '',
      request_type: '',
      ticket_description: '',
      isOpen: false,
      image: null,
      product_list: []
  };
  </code></pre>
  
  <p>this is beeing submited to the API this way:</p>
  
  <pre><code>handleSubmit = async e =&gt; {
      e.preventDefault();
  
      this.setState({ addItemModal: false });
  
      const data = new FormData();
  
      data.append('protocol_number', this.state.protocol_number);
      data.append('ticket_date', this.state.ticket_date);
      data.append('company_name', this.state.company_name);
      data.append('trading_name', this.state.trading_name);
      data.append('request_type', this.state.request_type);
      data.append('ticket_description', this.state.ticket_description);
      data.append('image', this.state.image);
  
      await api.post('new_ticket.php', data);
      console.log(this.state);
      this.props.history.push('/done');
  };
  </code></pre>
  
  <p>How can I get the product list like an array to submit everything together?
  Here is a example of the deployed app: <a href="https://am-devolucoes.herokuapp.com/" rel="nofollow noreferrer">heroku</a></p>