Next.js Discord

Discord Forum

how do I "use client" + fetch data?

Unanswered
African Slender-snouted Crocodil… posted this in #help-forum
Open in Discord
Original message was deleted.

2 Replies

the 'use client' directive is meant to be used for client side interactivity/mutations. if you want to fetch and await data as you did in your getStaticProps function you'll have to do it in a server component
that being said, if you don't show some of the relevant code people won't be able to properly help you migrate/solve your issue