App Router Concept
很有印象的一句話
What's more important than what you see here is what you don't see.
Target
- improved support for defining layouts
- nesting pieces of UI as layouts
- having more flexibility over defining loading and error states
Feature and change
- built on the foundation of React Server Components and Suspense.
- Works in a new directory named app, remove Next.js specific APIs that were initially developed to extend the React primitives
- no longer have to use a custom
_appfile to customize the global shared layout - global layout in
app/layout.jswill affect all routers
- no longer have to use a custom
- By default, all components are React Server Components → data fetching happens securely on the server.