From e3461b5d0ac2076237b270b1be12c5867a50d53c Mon Sep 17 00:00:00 2001 From: Nelo Date: Sun, 20 Mar 2022 13:33:29 +0100 Subject: [PATCH 1/2] Update get-server-side-props.md (typo fix) --- docs/basic-features/data-fetching/get-server-side-props.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/basic-features/data-fetching/get-server-side-props.md b/docs/basic-features/data-fetching/get-server-side-props.md index da0463f1fecd..9707af0b871e 100644 --- a/docs/basic-features/data-fetching/get-server-side-props.md +++ b/docs/basic-features/data-fetching/get-server-side-props.md @@ -21,7 +21,7 @@ export async function getServerSideProps(context) { - When you request this page directly, `getServerSideProps` runs at request time, and this page will be pre-rendered with the returned props - When you request this page on client-side page transitions through [`next/link`](/docs/api-reference/next/link.md) or [`next/router`](/docs/api-reference/next/router.md), Next.js sends an API request to the server, which runs `getServerSideProps` -It then returns `JSON` that contains the result of running `getServerSideProps`, that `JSON` will be used to render the page. All this work will be handled automatically by Next.js, so you don’t need to do anything extra as long as you have `getServerSideProps` defined. +It then returns `JSON` that contains the result of running `getServerSideProps`. That `JSON` will be used to render the page. All this work will be handled automatically by Next.js, so you don’t need to do anything extra as long as you have `getServerSideProps` defined. You can use the [next-code-elimination tool](https://next-code-elimination.vercel.app/) to verify what Next.js eliminates from the client-side bundle. From 25d8b5b5bdbdc2f4dc0da0282a95ab8885ad5000 Mon Sep 17 00:00:00 2001 From: Nelo Date: Sun, 20 Mar 2022 15:20:55 +0100 Subject: [PATCH 2/2] Rewritten suggestion in getServerSideProps doc page Co-authored-by: Steven --- docs/basic-features/data-fetching/get-server-side-props.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/basic-features/data-fetching/get-server-side-props.md b/docs/basic-features/data-fetching/get-server-side-props.md index 9707af0b871e..b09a70d0e8a8 100644 --- a/docs/basic-features/data-fetching/get-server-side-props.md +++ b/docs/basic-features/data-fetching/get-server-side-props.md @@ -21,7 +21,7 @@ export async function getServerSideProps(context) { - When you request this page directly, `getServerSideProps` runs at request time, and this page will be pre-rendered with the returned props - When you request this page on client-side page transitions through [`next/link`](/docs/api-reference/next/link.md) or [`next/router`](/docs/api-reference/next/router.md), Next.js sends an API request to the server, which runs `getServerSideProps` -It then returns `JSON` that contains the result of running `getServerSideProps`. That `JSON` will be used to render the page. All this work will be handled automatically by Next.js, so you don’t need to do anything extra as long as you have `getServerSideProps` defined. +`getServerSideProps` returns JSON which will be used to render the page. All this work will be handled automatically by Next.js, so you don’t need to do anything extra as long as you have `getServerSideProps` defined. You can use the [next-code-elimination tool](https://next-code-elimination.vercel.app/) to verify what Next.js eliminates from the client-side bundle.