Using the App Router
/blog/using-app-router
The App Router (the app/ directory) is the current, recommended way to build Next.js apps. It replaces the older Pages Router (pages/) and adds Server Components, nested layouts, and streaming.
This page was generated by
app/blog/[slug]/page.tsx— one file handling every post slug. Try changing the URL to a slug that doesn't exist to see notFound() trigger the nearest not-found.tsx(or Next's default 404) instead of crashing.