title: Creating multiple setState data using for loop
body: <p>I've been trying to create states for my application. Basically I have apples which  have ID and Status. So my code is:</p>
  
  <pre><code>constructor(props){
      super(props);
      this.state = {
        apples: [],
        treeState: ''
      }
    }
  
    componentWillMount(){
      this.setState(
        {
          apples: [
        {
          id: '1',
          status: 'present'
        },
        {
          id: '2',
          status: 'present'
        },
        {
          id: '3',
          status: 'present'
        }
      ],
    treeState: 'stagnant'});
    }
  </code></pre>
  
  <p>At some point I'll have ten or twelve apples. And creating them manually is both line consuming and not efficient. I need a for loop but couldn't find any useful one online. <a href="https://stackoverflow.com/questions/37657635/react-change-state-in-array-for-loop">This one</a> was promising but cannot implement it to my code. Also I have an another state that I called "treeState". So creating an apple loop with ID's plus adding the treeState at the end is my goal.</p>
  
  <p>Thanks.</p>