Digital Anumati
Answeredbanner

Cookie banner not rendering on Next.js App Router

Asked 8 Sept 2026640 viewsby Kabir Nair
Score
18
Vote2 replies
I've dropped `<ConsentBanner />` into my root layout but it never shows. Console has no errors. Works fine in a plain React CRA project. Is there an SSR nuance I'm missing?
18votes2answers640views
You

No comments yet

Be the first to share your thoughts.

2 Answers

Resolved
Sorted byVotes
24
Accepted Answer
The banner is a client component. In App Router you need to mark the file with `'use client'` or wrap `<ConsentBanner />` inside a client wrapper. Alternatively use our `<ConsentBannerServer />` variant which renders a stub and hydrates.
You

No comments yet

Be the first to share your thoughts.

6
Hit this too. Adding `'use client'` at the top of the layout is not enough — you need to isolate the banner in its own client file.
You

No comments yet

Be the first to share your thoughts.

Your Answer

0 characters