Skip to content

Instantly share code, notes, and snippets.

Created Aug 16, 2017
What would you like to do?
import Document, { Head, Main, NextScript } from 'next/document'
import { ServerStyleSheet } from 'styled-components'
import 'styles/global-styles';
export default class SiteDocument extends Document {
render () {
const sheet = new ServerStyleSheet()
const main = sheet.collectStyles(<Main />)
const styleTags = sheet.getStyleElement()
return (
<meta charSet="utf-8" />
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<div className="root">
<NextScript />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment