From 179c10a6519fa0f497a8fd582087bc6df275af3f Mon Sep 17 00:00:00 2001 From: GP Date: Tue, 13 Oct 2020 18:57:38 +0530 Subject: [PATCH 1/3] docs: Add note about how GSP and GSSP aren't supported in _document --- docs/advanced-features/custom-document.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/advanced-features/custom-document.md b/docs/advanced-features/custom-document.md index 363ff1215f43423..0fbdd1b512af755 100644 --- a/docs/advanced-features/custom-document.md +++ b/docs/advanced-features/custom-document.md @@ -51,9 +51,10 @@ The `ctx` object is equivalent to the one received in [`getInitialProps`](/docs/ ## Caveats -- `Document` is only rendered in the server, event handlers like `onClick` won't work -- React components outside of `
` will not be initialized by the browser. Do _not_ add application logic here or custom CSS (like `styled-jsx`). If you need shared components in all your pages (like a menu or a toolbar), take a look at the [`App`](/docs/advanced-features/custom-app.md) component instead -- `Document`'s `getInitialProps` function is not called during client-side transitions, nor when a page is [statically optimized](/docs/advanced-features/automatic-static-optimization.md) +- `Document` is only rendered in the server, event handlers like `onClick` won't work. +- React components outside of `
` will not be initialized by the browser. Do _not_ add application logic here or custom CSS (like `styled-jsx`). If you need shared components in all your pages (like a menu or a toolbar), take a look at the [`App`](/docs/advanced-features/custom-app.md) component instead. +- `Document`'s `getInitialProps` function is not called during client-side transitions, nor when a page is [statically optimized](/docs/advanced-features/automatic-static-optimization.md). +- `Document` does not support [`getServerSideProps`](/docs/basic-features/data-fetching#getserversideprops-server-side-rendering) or [`getStaticProps`](/docs/basic-features/data-fetching#getstaticprops-static-generation). ## Customizing `renderPage` From c2a00dc3a34b1f9d92b7db464612edbb9c9a9f1f Mon Sep 17 00:00:00 2001 From: GP Date: Tue, 13 Oct 2020 18:57:41 +0530 Subject: [PATCH 2/3] docs: Add note about how GSP and GSSP aren't supported in _app --- docs/advanced-features/custom-app.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/advanced-features/custom-app.md b/docs/advanced-features/custom-app.md index 8f0ea8aab40589a..ce12d5fcabcf23c 100644 --- a/docs/advanced-features/custom-app.md +++ b/docs/advanced-features/custom-app.md @@ -44,6 +44,7 @@ The `Component` prop is the active `page`, so whenever you navigate between rout - If your app is running and you just added a custom `App`, you'll need to restart the development server. Only required if `pages/_app.js` didn't exist before. - Adding a custom `getInitialProps` in your `App` will disable [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md) in pages without [Static Generation](/docs/basic-features/data-fetching.md#getstaticprops-static-generation). +- `App` does not support [`getServerSideProps`](/docs/basic-features/data-fetching#getserversideprops-server-side-rendering) or [`getStaticProps`](/docs/basic-features/data-fetching#getstaticprops-static-generation). ### TypeScript From aaa9e60ae4a6bd0229330926815dfa9b193ed8ef Mon Sep 17 00:00:00 2001 From: Luis Alvarez Date: Tue, 13 Oct 2020 13:51:33 -0500 Subject: [PATCH 3/3] Updated links --- docs/advanced-features/custom-app.md | 2 +- docs/advanced-features/custom-document.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/advanced-features/custom-app.md b/docs/advanced-features/custom-app.md index ce12d5fcabcf23c..571bf79da5a6e26 100644 --- a/docs/advanced-features/custom-app.md +++ b/docs/advanced-features/custom-app.md @@ -44,7 +44,7 @@ The `Component` prop is the active `page`, so whenever you navigate between rout - If your app is running and you just added a custom `App`, you'll need to restart the development server. Only required if `pages/_app.js` didn't exist before. - Adding a custom `getInitialProps` in your `App` will disable [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md) in pages without [Static Generation](/docs/basic-features/data-fetching.md#getstaticprops-static-generation). -- `App` does not support [`getServerSideProps`](/docs/basic-features/data-fetching#getserversideprops-server-side-rendering) or [`getStaticProps`](/docs/basic-features/data-fetching#getstaticprops-static-generation). +- `App` currently does not support Next.js [Data Fetching methods](/docs/basic-features/data-fetching.md) like [`getStaticProps`](/docs/basic-features/data-fetching.md#getstaticprops-static-generation) or [`getServerSideProps`](/docs/basic-features/data-fetching.md#getserversideprops-server-side-rendering). ### TypeScript diff --git a/docs/advanced-features/custom-document.md b/docs/advanced-features/custom-document.md index 0fbdd1b512af755..2c75cca86b376e4 100644 --- a/docs/advanced-features/custom-document.md +++ b/docs/advanced-features/custom-document.md @@ -54,7 +54,7 @@ The `ctx` object is equivalent to the one received in [`getInitialProps`](/docs/ - `Document` is only rendered in the server, event handlers like `onClick` won't work. - React components outside of `
` will not be initialized by the browser. Do _not_ add application logic here or custom CSS (like `styled-jsx`). If you need shared components in all your pages (like a menu or a toolbar), take a look at the [`App`](/docs/advanced-features/custom-app.md) component instead. - `Document`'s `getInitialProps` function is not called during client-side transitions, nor when a page is [statically optimized](/docs/advanced-features/automatic-static-optimization.md). -- `Document` does not support [`getServerSideProps`](/docs/basic-features/data-fetching#getserversideprops-server-side-rendering) or [`getStaticProps`](/docs/basic-features/data-fetching#getstaticprops-static-generation). +- `Document` currently does not support Next.js [Data Fetching methods](/docs/basic-features/data-fetching.md) like [`getStaticProps`](/docs/basic-features/data-fetching.md#getstaticprops-static-generation) or [`getServerSideProps`](/docs/basic-features/data-fetching.md#getserversideprops-server-side-rendering). ## Customizing `renderPage`