Next.js Discord

Discord Forum

Hydration Error When Opening Shadcn Drawer via Search Param in Next.js App Router

Unanswered
Abdullah Aly posted this in #help-forum
Open in Discord
I'm using ShadCN's <Drawer> in a Next.js App Router project. I want to auto-open it if ?open-drawer=true is in the URL.

Even with ssr: false and mounted guards, I get hydration errors if the page is refreshed with the param present.

2 Replies