提交 299cc65d 编写于 作者: A Adam Stankiewicz 提交者: 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
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册