Next.js Discord

Discord Forum

Sidebar in my nextjs app router app

Unanswered
Bakharwal dog posted this in #help-forum
Open in Discord
Bakharwal dogOP
i have a very large sidebar in my nextjs app router app. should I build the sections in the server and pass down the sections array to the client? it is very large (almost 1.5MB) of data. this causes all the RSC Payloads of all pages under that layout to have this payload. should I instead fetch the sections from the sidebar client component through a server action? what is the best practice regarding sidebar building in nextjs app router app?

1 Reply

you can prob use Suspense for it