title: React error .map() is not a function after updating api data
body: <p>I am currently working on a project where my react app connects to my own api. I've run into a problem that I can't seem to overcome. When I try to update my data I get an error saying map is not a function.</p>
  
  <p>this is my vehicleOverview.js script this is supposed to show a list of all my available data wich works fine untill a I update a data element.</p>
  
  <pre><code>export class VehicleOverview extends React.Component{
  constructor(props){
      super(props);
  
      this.state= {
          vehicles: [],
      }
      getAll().then((response) =&gt; {
          console.log(response.message);
  
          this.setState({
            vehicles: response.message,
          });
  
        }).catch((error) =&gt; {
          console.error(error);
        });
  }
  render(){
      return(
          &lt;div &gt;
          &lt;h2&gt;Vehicle List&lt;/h2&gt;
          &lt;ul &gt;
          {    
            this.state.vehicles.map((vehicle, i) =&gt; {
               return(
              &lt;Vehicle key={`vehicle-${i}`} {...vehicle} /&gt;);
            })     
          }
          &lt;/ul&gt;
          &lt;/div&gt;
  
      );
  }
  }
  export default VehicleOverview;
  </code></pre>
  
  <p>I am not sure what is going wrong because I am pretty sure vehicles is an array. Tell me if I need to provide more code to solve this problem</p>