Hydration Error When Opening Shadcn Drawer via Search Param in Next.js App Router
Unanswered
Abdullah Aly posted this in #help-forum
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.
Even with ssr: false and mounted guards, I get hydration errors if the page is refreshed with the param present.
2 Replies
maybe use https://nextjs.org/docs/app/guides/lazy-loading for importing navbarDrawer? and u dont need state for isClient aswell