title: Set Fetched JSON data as state and use it
body: <p>I'm a newbie to React so I'm trying to learn basic concepts.</p>
  
  <p>I'm getting data through an API I hardcoded some data into for learning purposes, with a fetch request like so:</p>
  
  <pre><code>componentDidMount() {
      fetch("myserver.com/api/a/1")
      .then(function(response) {
          response.json()
      })
  }
  </code></pre>
  
  <p>and in my constructor I set the state to data: 'false':</p>
  
  <pre><code>constructor(props) {
      super(props)
  
      this.state = {data: 'false'};
  }
  </code></pre>
  
  <p>But from here on I'm lost. I have three different strings in the JSON Object I'm getting through my API but I don't know how to access them. I've tried setting setState in <code>componentDidMount</code> but I'm getting loads of error.</p>
  
  <p>How do you do in situations like these? Where should I be setting state, and how do you generally access/iterate over JSON objects?</p>
  
  <p>Thanks in advance!</p>