Next.js Discord

Discord Forum

Entire page deopted into client side rendering.

Unanswered
@ts-ignore posted this in #help-forum
Open in Discord
I am getting this warning
- warn Entire page / deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /

but my page at / isn't even rendering anything just redirecting users based on their role

13 Replies

That sounds strange, try using middleware instead?
And you don’t need to return redirect, it throws a redirect error
@fuma That sounds strange, try using middleware instead?
I am using middleware but I don't think it will be a good idea to fetch my api in middleware
This is a case where middleware shines a lot more
But in a page then that sounds weird… can you make a repro?
@joulev But in a page then that sounds weird… can you make a repro?
I will make one in the evening
@joulev But in a page then that sounds weird… can you make a repro?
can it be because I use some providers marked with use client in layout?
No, passing server components to a client component won't cause any problems
we're basically in a repro or naught territory here, so make one
Black-throated Sparrow
@@ts-ignore Not that this is relevant to your question but what VSCode theme are you using? It looks pretty sick haha