title: Unable to properly do a fetch with Next.js
body: <p>I am having trouble doing a fetch according to the documentation available on the Next.js website.  I have tried to console the props, which I can't get to show up.  I don't have experience with Next, trying to mirror it to React, but unfortunately it's not working. How can I do a fetch using getStaticProps?  I have a tutorial that is using getInitialProps for an older version of Next.js, but I am trying to follow their new documentation. Here is the starter code I have so far:</p>
  
  <pre><code>import React, { Component } from 'react';
  // import fetch from 'node-fetch'
  
  class Index extends Component {
      state = {}
  
      getStaticProps = async () =&gt; {
          // Call an external API endpoint to get posts.
          console.log('fetching data')
          const res = await fetch('https://jsonplaceholder.typicode.com/todos/1')
          const posts = await res.json()
  
  
          return {
              props: {
                  posts,
              },
          }
  
      }
      render() {
          console.log(this.props)
          return (
              &lt;div&gt;
                  &lt;h1&gt;Our Index Page!!&lt;/h1&gt;
              &lt;/div&gt;
          );
      }
  }
  
  
  export default Index
  </code></pre>