mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
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
This commit is contained in:
parent
61fe50a493
commit
299cc65d21
|
@ -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:
|
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)
|
- `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)
|
||||||
|
|
Loading…
Reference in a new issue