Use notFound() for invalid dynamic route params
When a dynamic route param doesn't match any record, call notFound() from next/navigation to show the 404 page.
Why This Matters
Without notFound(), invalid slugs either crash with a null access error or silently render an empty page.
Tags
nextjssupabase
Related Rules
Catch this automatically on every PR
BeforeMerge scans your pull requests against this rule and 2+ others. Get actionable feedback before code ships.