Next.js Discord

Discord Forum

Catch-all route without requests to the server

Unanswered
Large garden bumble bee posted this in #help-forum
Open in Discord
Large garden bumble beeOP
I would like to create a client-sided catch-all layout, similar to https://github.com/vercel/nextgram. However, I don't want the client to be fetching each and every page from the server. Instead, I am handling the data on the client-side. How can I achieve this?

5 Replies

Large garden bumble beeOP
Nextgram's frontend will request all of these pages from the server each and every time the user clicks on a post, which is not what I want:
Large garden bumble beeOP
Bump^?
well, the client is supposed to fetch data from the server to get the pages
unless you save it on the client
Large garden bumble beeOP
I want the prerendered dynamic pages to be static, and fetch on the client. However, even when doing so with "use client", the client still insists that RSC related requests must be made