Static generation for a single product page
Answered
filip posted this in #help-forum
filipOP
hello 👋 i am a nextjs newbie and i need help. I'm creating a catalog website combined with mysql db and i want to have dynamic route for a single product page, that will be statically generated. I'm having an issue because getStaticPaths is not supported for app/ directory in nextjs 14 (at least from what i have read). So my question is what would you recommend i use and how?"
Answered by B33fb0n3
the alternative is [generateStaticParams](https://nextjs.org/docs/app/api-reference/functions/generate-static-params). With that you can do the same
4 Replies
@filip hello 👋 i am a nextjs newbie and i need help. I'm creating a catalog website combined with mysql db and i want to have dynamic route for a single product page, that will be statically generated. I'm having an issue because getStaticPaths is not supported for app/ directory in nextjs 14 (at least from what i have read). So my question is what would you recommend i use and how?"
the alternative is [generateStaticParams](https://nextjs.org/docs/app/api-reference/functions/generate-static-params). With that you can do the same
Answer
@filip solved?
filipOP
yes but now i am having an issue with generateStaticParams weird behavior 🥸 🔨
@filip yes but now i am having an issue with generateStaticParams weird behavior 🥸 🔨
Lol, open a new thread. For that specific topic you can ping me once, inside your new thread