rewriting jweidesigns.com with next 13 app dir today some thoughts:
- typing url params stills sucks , there has got to be better way:
type BlogSlugPageProps = {
params: { slug: string };
};
export default function BlogSlugPage({ params }: BlogSlugPageProps) {
const slug = params.slug;
return <>Slug page | {slug}</>;
}
- you can’t “opt out” of global layouts. Instead its important to think about layouts in terms of layout groups. But how do you wrap the index page into a group? 🤔
turns out this the more informative doc that explains how route groups work https://nextjs.org/docs/app/building-your-application/routing/route-groups
- it works by wrapping sections of your UI code into folders named with parenthesis