Next.js Discord

Discord Forum

where should i fetch data? in server or client component?

Unanswered
Bumble bee posted this in #help-forum
Open in Discord
Bumble beeOP
... or in what place should I fetch data from a json api?

or in general: how to nest data with fetching apis in each component?

4 Replies

You should fetch your data serverside in a page.js for example and pass it down to the components, that needs the specific data (or if you don’t have any, then just work in page.js)
@Bumble bee solved? please mark solution
@Bumble bee ?
Bumble beeOP
yes. sorry, I dont know how to mark it solved.