Generate static params multilevel from top down
Unanswered
Dutch Shepherd posted this in #help-forum
Dutch ShepherdOP
When generating static params from a parent level to children, does the generateStaticParams for the parent segments have to be in the parent’s layout.tsx?
I tried putting it in the parent’s page.tsx, but then the child couldn’t see the generated params in the child’s generateStaticParams function anymore.
I saw in the docs example for multi level top down approach put the generateStaticParams in the layout.tsx instead of page.tsx.
https://nextjs.org/docs/app/api-reference/functions/generate-static-params#generate-params-from-the-top-down
I tried putting it in the parent’s page.tsx, but then the child couldn’t see the generated params in the child’s generateStaticParams function anymore.
I saw in the docs example for multi level top down approach put the generateStaticParams in the layout.tsx instead of page.tsx.
https://nextjs.org/docs/app/api-reference/functions/generate-static-params#generate-params-from-the-top-down