Next.js Discord

Discord Forum

Storing additional data from API calls on the server

Unanswered
American Wirehair posted this in #help-forum
Open in Discord
American WirehairOP
Hey guys,

I have a dynamic route component
/[bookName]/

To generate the slugs I make an API call that returns
{
id: number,
slug: string,
name: string,
...
}


My issue is the only data I can return from generateStaticParams is the slug. So how do I store the additional data without adding additional slugs? This is for the APP directory

2 Replies

Are you using app or pages dir?
American WirehairOP
App