Further, you can nest layouts, and colocate application code with your routes, like components, tests, and styles. The app/ directory makes it easy to lay out complex interfaces that maintain state across navigations, avoid expensive re-renders, and enable advanced routing patterns. The app directory can be incrementally adopted from your existing pages/ directory. Support for Data Fetching: async Server Components and extended fetch API enables component-level fetching.Streaming: Display instant loading states and stream in units of UI as they are rendered.Server Components: Making server-first the default for the most dynamic applications.Layouts: Easily share UI between routes while preserving state and avoiding expensive re-renders.The pages directory will continue to be supported for the foreseeable future. You can use Next.js 13 with the pages directory with stable features like the improved next/image and next/link components, and opt into the app directory at your own pace. The app directory is currently in beta and we do not recommend using it in production yet. This is a follow-up to the Layouts RFC previously published for community feedback. Today, we're improving the routing and layouts experience in Next.js and aligning with the future of React with the introduction of the app directory.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |