Next.js Discord

Discord Forum

Confusion regarding dynamic data on site

Unanswered
Spectacled bear posted this in #help-forum
Open in Discord
Spectacled bearOP
is this the appropriate channel for next.js questions?
Hope so, if not, @ me and I will move this th wherever I should ^^

So, I'm new to next (and react) and I'm having trouble understanding how the framework works
If I wanna add data to a page dynamically, I use getDynamicData? or is that for routing?
Like, do I have to add a js file on a different path (using app directory, not pages) and export a function with the dynamic data or do I have tio do something completely different? I have no idea how something like that could work (for example, what I'm trying to do is I'm requesting something from an API and want to display for example the same value (eg name) of x different entries depending on the API response. How do i go about that, is there a way I can loop through and add the html for each loop iteration?
The docs are confusing, throwing me back and forth through different topics and I've lost track of evertything, really...

0 Replies