Next.js
Hoe werkt file-based routing in Next.js?
Routes worden automatisch aangemaakt op basis van bestandsstructuur.
Routing structuur
app/page.tsx = / app/about/page.tsx = /about app/posts/[id]/page.tsx = /posts/:id (dynamic) app/api/users/route.ts = POST /api/users
Code Voorbeelden
JAVASCRIPTDynamic route✏️ Interactief
✏️CODE AANPASSEN
LIVE PREVIEW
Relevante trefwoorden
routingfile-baseddynamic