You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 21, 2021. It is now read-only.
Page component can export function getStaticProps, and we will run it on the server side at build time.
Since it's only used in build time you can't access stuff like req.query, if the route path contains paramater like /post/:slug, you also need to export a function getStaticPaths which returns a set of static paths so we can use it to render the page.
The text was updated successfully, but these errors were encountered:
Page component can export function
getStaticProps
, and we will run it on the server side at build time.Since it's only used in build time you can't access stuff like
req.query
, if the route path contains paramater like/post/:slug
, you also need to export a functiongetStaticPaths
which returns a set of static paths so we can use it to render the page.The text was updated successfully, but these errors were encountered: