Commit 299cc65d authored by Adam Stankiewicz's avatar Adam Stankiewicz Committed by Tim Neutkens

Show that <Head /> is needed for custom document (#5376)

* Show that <Head /> is needed for custom document

* Add comment explaining required Document fields

* Update README.md
parent 61fe50a4
......@@ -1120,6 +1120,8 @@ export default class MyDocument extends Document {
}
```
All of `<Head />`, `<Main />` and `<NextScript />` are required for page to be properly rendered.
The `ctx` object is equivalent to the one received in all [`getInitialProps`](#fetching-data-and-component-lifecycle) hooks, with one addition:
- `renderPage` (`Function`) a callback that executes the actual React rendering logic (synchronously). It's useful to decorate this function in order to support server-rendering wrappers like Aphrodite's [`renderStatic`](https://github.com/Khan/aphrodite#server-side-rendering)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment