Skip to content
Discussion options

You must be logged in to vote

This answer should be helpful.

To quote Tim's response:

getStaticPaths generates static files, which means they can't access querystring at generation time, you can however access them during browser rendering using useRouter: https://nextjs.org/docs/api-reference/next/router#userouter

The same is true of getStaticProps.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jamesmosier
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants