Unverified Commit f4dcb81d authored by Ryan's avatar Ryan Committed by GitHub

[docs] Clarify "When does getStaticProps run" note (#37289)

Changed bullet points to say "getStaticPaths" instead of "getStaticProps".

Fixes https://github.com/vercel/next.js/issues/37288 

## Feature

- [x] Related issues linked using `fixes #number`
- [x] Documentation added

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
parent d1b7e7f6
......@@ -37,6 +37,8 @@ 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/).
### 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`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment