title: NextJS dynamic title
body: <p>Have been googling forever and found a way to change the <code>&lt;title&gt;</code>. That way is this: <a href="https://github.com/zeit/next.js/tree/master/examples/layout-component" rel="noreferrer">https://github.com/zeit/next.js/tree/master/examples/layout-component</a></p>
  
  <p>The main problem with this is that everytime someone refresh the site/change page the title goes from <code>http://localhost:3000</code> to the actual Title (eg. About us) and I'm a bit afraid of how this is affecting the SEO.</p>
  
  <p>What is the correct way of chaning the page title dynamically?</p>
  
  <p>My layout file:</p>
  
  <pre><code>import Link from 'next/link'
  import Head from './../node_modules/next/head'
  
  export default function Layout({ children, title = 'Welcome to my website' }) {
    return (
      &lt;div&gt;
          &lt;Head&gt;
            &lt;title&gt;{title}&lt;/title&gt;
          &lt;/Head&gt;
  
          {children}
      &lt;/div&gt;
    )
  }
  </code></pre>