title: Async function with a loading screen
body: <p>I am setting state in the constructor like this - this is for text that says "Fetching data...":</p>
  
  <pre><code>this.state = {
        loading: true
      }
  </code></pre>
  
  <p>Then I have an async function like this, which will get some data.</p>
  
  <pre><code>componentDidMount() {
      this.fetchData().done()
    }
  
    async fetchData() {
      const response = await fetch(URL)
      const json = await response.json()
      const stars = json.stargazers_count
      this.setState({ stars })
    }
  </code></pre>
  
  <p>How do I know when I can set the isLoading state to false and hide the loading text and display the data?  I seem to be missing some piece here!</p>
  
  <p>Thanks
  Jordan</p>