Skip to content

Commit

Permalink
Merge branch 'canary' into clean-up-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Meindertsma committed Sep 12, 2020
2 parents 73b8ad1 + 9adf3bb commit 1f121e9
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion errors/missing-document-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,32 @@ In your custom `pages/_document` an expected sub-component was not rendered.

#### Possible Ways to Fix It

Make sure to import and render all of the expected `Document` components.
Make sure to import and render all of the expected `Document` components:

- `<Html />`
- `<Head />`
- `<Main />`
- `<NextScript />`

For example:

```tsx
import Document, { Html, Head, Main, NextScript } from 'next/document'

export default class MyDocument extends Document {
render() {
return (
<Html>
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
}
```

### Useful Links

Expand Down

0 comments on commit 1f121e9

Please sign in to comment.