Not clear on the use of getStaticProps and getStaticPaths with dynamic routes #11673
Unanswered
samuelgoldenbaum
asked this question in
Help
Replies: 2 comments
-
These are only ran at build time. Can you please explain why you think they're being ran at runtime? |
Beta Was this translation helpful? Give feedback.
0 replies
-
if you build the app with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am finding the docs a little ambiguous. Given a list franchises, we would like to render out the relevant franchise detail pages at build time to avoid hitting the CMS/API at run time as these don't change frequently.
However, it seems that even if the relevant pages are generated at build time, they still require the calls in
getStaticProps
to be executed at runtime. This defeats the purpose of generating static pages.Perhaps, I am doing something wrong, but I am looking for some docs/demo on how to generate static pages at build time using data from API that do not require any further calls at runtime to populate props.
Beta Was this translation helpful? Give feedback.
All reactions