title: Multiple Axios Requests Into ReactJS State
body: <p>So I have been placing the following code within my React JS component and I am basically trying to put both API calls into one state called <code>vehicles</code> however I am getting an error with the following code:</p>
  
  <pre><code>componentWillMount() {
  
      // Make a request for vehicle data
  
      axios.all([
        axios.get('/api/seat/models'),
        axios.get('/api/volkswagen/models')
      ])
      .then(axios.spread(function (seat, volkswagen) {
        this.setState({ vehicles: seat.data + volkswagen.data })
      }))
      //.then(response =&gt; this.setState({ vehicles: response.data }))
      .catch(error =&gt; console.log(error));
    }
  </code></pre>
  
  <p>Now I am guessing I can't add two sources of data like I have <code>this.setState({ vehicles: seat.data + volkswagen.data })</code> however how else can this be done? I just want all of the data from that API request to be put into the one state.</p>
  
  <p>This is the current error I am receiving:</p>
  
  <pre><code>TypeError: Cannot read property 'setState' of null(…)
  </code></pre>
  
  <p>Thanks</p>