title: React js fetch API
body: <p>I am learning React.js and trying to fetch API like this</p>
  
  <pre><code>constructor() {
      super();
  
      this.state = {person: []};
  }
  
  componentDidMount() {
      fetch('https://randomuser.me/api/?results=500', {mode: 'no-cors'})
              .then(results =&gt; {
                  return results.json();
              })
              .then(data =&gt; {
                  let person = (data.results || []).map((pic) =&gt; {
                      return(
                              &lt;div key={pic.results}&gt;&lt;/div&gt;
                              )
                  })
  
                  this.setState({person: person});
                  console.log("state", this.state.person);
              })
  }
  
  render() {
  
      return (
              &lt;div&gt;
                  {this.state.person}
              &lt;/div&gt;
      );
  }
  </code></pre>
  
  <p>and this is the error I get</p>
  
  <p><a href="http://prntscr.com/k36ggq" rel="nofollow noreferrer">http://prntscr.com/k36ggq</a></p>
  
  <p>I am pretty new in this, so if anyone can help me with this that would be great. Thanks</p>