Next.js 13+ introduces the app router and a new directory structure called the app router for handling API routes. Each Route Handler file is named 'route.ts' and the URL slug for accessing a specific handler is determined by the containing directory. The new syntax for Route Handlers allows for managing different HTTP requests separately.

2m read timeFrom spin.atomicobject.com
Post cover image
Table of contents
Directory StructureRoute Handler SyntaxEmbracing API Route Handlers

Sort: