From 715638c7c1988b6942ebf14fcb68d5a6f612ab13 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 29 May 2022 22:39:13 +0100 Subject: [PATCH 1/2] Correct "When does getStaticPaths run" bullets Changed bullet points to say "getStaticPaths" instead of "getStaticProps". --- docs/basic-features/data-fetching/get-static-paths.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/basic-features/data-fetching/get-static-paths.md b/docs/basic-features/data-fetching/get-static-paths.md index a5fa8d9c7453e..3865dea078289 100644 --- a/docs/basic-features/data-fetching/get-static-paths.md +++ b/docs/basic-features/data-fetching/get-static-paths.md @@ -37,9 +37,9 @@ You should use `getStaticPaths` if you’re statically pre-rendering pages that `getStaticPaths` will only run during build in production, it will not be called during runtime. You can validate code written inside `getStaticPaths` is removed from the client-side bundle [with this tool](https://next-code-elimination.vercel.app/). -- `getStaticProps` runs during `next build` for any `paths` returned during build -- `getStaticProps` runs in the background when using `fallback: true` -- `getStaticProps` is called before initial render when using `fallback: blocking` +- `getStaticPaths` runs during `next build` for any `paths` returned during build +- `getStaticPaths` runs in the background when using `fallback: true` +- `getStaticPaths` is called before initial render when using `fallback: blocking` ## Where can I use getStaticPaths From abebcc3f2bf3b895f631ce72345c1e4dcfdb0f73 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 29 May 2022 23:12:00 +0100 Subject: [PATCH 2/2] Add sub-section for getStaticProps Clarify mention of getStaticProps within getStaticPaths docs --- docs/basic-features/data-fetching/get-static-paths.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/basic-features/data-fetching/get-static-paths.md b/docs/basic-features/data-fetching/get-static-paths.md index 3865dea078289..659c8d8b071c5 100644 --- a/docs/basic-features/data-fetching/get-static-paths.md +++ b/docs/basic-features/data-fetching/get-static-paths.md @@ -37,9 +37,11 @@ You should use `getStaticPaths` if you’re statically pre-rendering pages that `getStaticPaths` will only run during build in production, it will not be called during runtime. You can validate code written inside `getStaticPaths` is removed from the client-side bundle [with this tool](https://next-code-elimination.vercel.app/). -- `getStaticPaths` runs during `next build` for any `paths` returned during build -- `getStaticPaths` runs in the background when using `fallback: true` -- `getStaticPaths` is called before initial render when using `fallback: blocking` +### How does getStaticProps run with regards to getStaticPaths + +- `getStaticProps` runs during `next build` for any `paths` returned during build +- `getStaticProps` runs in the background when using `fallback: true` +- `getStaticProps` is called before initial render when using `fallback: blocking` ## Where can I use getStaticPaths