title: React - TypeError: this.state.data.map is not a function
body: <p>I have <code>state data:[]</code> and I am trying to set the values of URL in the state:</p>
  
  <pre><code>componentDidMount(){
  axios.get('http://localhost:8082/seekers')
    .then( response =&gt; {
       console.log(response.data);
       this.setState({data: response.data})
  })
  .catch(error =&gt;  {
   console.log(error);
  });
  }
  </code></pre>
  
  <p>When I use a map to show the data:</p>
  
  <pre><code>this.state.data.map((dynamicData,key)=&gt;
  &lt;div key={id++}&gt;
  {dynamicData.name}{dynamicData.bloodtype}{dynamicData.bloodunits}
   &lt;/div&gt;
  )
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>TypeError: this.state.data.map is not a function</p>
  </blockquote>
  
  <p>How to fix it?</p>