import Document , { Html , Head , Main , NextScript , NextDocumentContext , } from 'next/document' ; import { resetServerContext } from 'react-beautiful-dnd' ; class MyDocument extends Document { public static async getInitialProps ( context ) { resetServerContext ( ) ; const initialProps = await Document . getInitialProps ( context ) ; return { ... initialProps } ; } public render ( ) { return ( < Html > < Head /> < body > < Main /> < NextScript / > < /body> < /Html>); } } export default MyDocument ;