How can I implement a SSG page that needs a Client Component? #67276
Unanswered
ricemountainer
asked this question in
App Router
Replies: 0 comments
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.
-
I'm trying to migrate my Next.js v12 app to v14 App Router. On v12, there is an SSG page that is implemented by
getStaticPathsandgetStaticProps. In my understanding,generateStaticParamscan be used for the migration of the page. However, the page uses a client component (it meansuse clientdirective in its code), and I'm seeingTypeError: F is not a functionerror whennext build. It seems the page doesn't recognize the client component as a function in the build. It means the page that usesgenerateStaticParamscan't import a Client Component. Is it correct? If so, how can I implement a SSG page that needs a Client Component?Beta Was this translation helpful? Give feedback.
All reactions