Skip to content

Commit 660147f

Browse files
authored
Update README.md
1 parent 12ae74c commit 660147f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,7 @@ export default ({ url }) => (
276276

277277
### Custom `<Document>`
278278

279-
Pages in `Next.js` skip the definition of the surrounding document's markup. For example, you never include `<html>`, `<body>`, etc.
280-
281-
In order to support custom server-rendering pipelines (such as rendering CSS with `styled-components` or `glamor`), you can implement `getInitialProps` at the `<Document>` level:
279+
Pages in `Next.js` skip the definition of the surrounding document's markup. For example, you never include `<html>`, `<body>`, etc. But we still make it possible to override that:
282280

283281
```jsx
284282
import Document, { Head, Main, NextScript } from `next/document`
@@ -306,7 +304,7 @@ export default class MyDocument extends Document {
306304
}
307305
```
308306

309-
The `ctx` object is equivalent to the one received in all [`getInitialProps`](#fetching-data-and-component-lifecycle) hooks, plus:
307+
The `ctx` object is equivalent to the one received in all [`getInitialProps`](#fetching-data-and-component-lifecycle) hooks, with one addition:
310308

311309
- `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)
312310

0 commit comments

Comments
 (0)