title: nextjs getServerSideProps show loading
body: <p>I am using getServerSideProps in <a href="https://github.com/harm-meijer/nextjs-example//blob/d20696784fda6b74f701e163dc85c67be72e8e8f/pages/post/index.js" rel="noreferrer">pages/post/index.js</a>:</p>
  
  <pre><code>import React from "react";
  import Layout from "../../components/Layout";
  
  function Post({ post }) {
    console.log("in render", post);
    return (
      &lt;Layout title={post.name}&gt;
        &lt;pre&gt;{JSON.stringify(post, undefined, 2)}&lt;/pre&gt;
      &lt;/Layout&gt;
    );
  }
  
  export async function getServerSideProps({ query }) {
    return fetch(
      `${process.env.API_URL}/api/post?id=${query.id}`
    )
      .then(result =&gt; result.json())
      .then(post =&gt; ({ props: { post } }));
  }
  
  export default Post;
  </code></pre>
  
  <p>When I directly load <code>/post/2</code> it works as expected but when I go from <code>/posts</code> to <code>/post/2</code> by clicking on a link:</p>
  
  <pre><code>&lt;Link
    as={`/post/${post.id}`}
    href={`/post?id=${post.id}`}
  &gt;
  </code></pre>
  
  <p>It looks like nothing happens for 2 seconds (<a href="https://github.com/harm-meijer/nextjs-example//blob/d20696784fda6b74f701e163dc85c67be72e8e8f/pages/api/post/index.js#L5-L5" rel="noreferrer">the api delay</a>) and then the content shows. I can see in the network tab that <code>_next/data/development/post/9.json</code> is being loaded by <a href="https://github.com/zeit/next.js/blob/v9.3.0/packages/next/next-server/lib/router/router.ts#L77" rel="noreferrer">fetchNextData</a>.</p>
  
  <p>I would like to show a loading spinner when I move from one route to another using <code>next/Link</code> but I can't find any documentation on getServerSideProps that allows me to do this.</p>
  
  <p>When I directly go to <code>/post/:id</code> I'd like the data to be fetched server side and get a fully rendered page (works) but when I then move to another route the data should be fetched from the client (works). However; I would like to have a loading indicator and not have the UI freeze up for the duration of the data request.</p>