From 299cc65d21fc65d5d827d1240921b8c74505b7a8 Mon Sep 17 00:00:00 2001
From: Adam Stankiewicz
Date: Wed, 10 Oct 2018 12:00:02 +0200
Subject: [PATCH] Show that is needed for custom document (#5376)
* Show that
is needed for custom document
* Add comment explaining required Document fields
* Update README.md
---
packages/next/README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/packages/next/README.md b/packages/next/README.md
index f11a6db8..ae073c61 100644
--- a/packages/next/README.md
+++ b/packages/next/README.md
@@ -1120,6 +1120,8 @@ export default class MyDocument extends Document {
}
```
+All of `
`, `` and `` 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)