Skip to content

Commit 9fb7987

Browse files
Regginoarunoda
authored andcommitted
vercel#1874 - A warning when using _document.js (vercel#1884)
1 parent 96b5e4a commit 9fb7987

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,8 @@ The `ctx` object is equivalent to the one received in all [`getInitialProps`](#f
614614

615615
- `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)
616616

617+
__Note: React-components outside of `<Main />` will not be initialised by the browser. If you need shared components in all your pages (like a menu or a toolbar), do _not_ add application logic here, but take a look at [this example](https://github.com/zeit/next.js/tree/master/examples/layout-component).__
618+
617619
### Custom error handling
618620

619621
404 or 500 errors are handled both client and server side by a default component `error.js`. If you wish to override it, define a `_error.js`:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy