In Next.js, layouts remain the same across route changes and don't re-render, which means they can't directly access search parameters. To access search params, you should use client components which handle these dynamic changes without requiring the entire layout to re-render.
6 Comments
Sort: