Next.js 13 introduces layouts, React Server Components, and streaming in the app directory, as well as Turbopack, an improved image component, and the brand new font component.
As we announced at Next.js Conf , Next.js 13 (stable) lays the foundations to be dynamic without limits:
Next.js 13 and the pages directory are stable and ready for production. Update today by running:
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. This is a follow-up to the Layouts RFC previously published for community feedback.
The app directory is currently in beta and we do not recommend using it in production yet. 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.
This is an excerpt. The full article is published by Next.js Blog.
Answers to common questions regarding this article's topic, architecture, and practical applications.
The app/ directory introduces support for React's new Server Components architecture. Server and Client Components use the server and the client each for what they're best at - allowing you to build fast, highly-interactive apps with a single programming model that provides a great developer experience. With Server Components, we're laying the foundations to build complex interfaces while reducing the amount of JavaScript sent to the client, enab
General
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. This is a follow-up to the Layouts RFC previously published for community feedback. The app directory is currently in beta and we do not recommend using it in production yet. You can use Next.js 13 with the pages directory with stable features like the improved next/image and next/link components,
General
React's recent Support for Promises RFC introduces a powerful new way to fetch data and handle promises inside components: async function getData() {
const res = await fetch('https://api.example.com/...');
// The return value is *not* serialized
// You can return Date, Map, Set, etc.
return res.json();
}
// This is an async Server Component
export default async function Page() {
const data = await getData();
return <main>{/* ... *
Benefits / Advantages
As we announced at Next.js Conf, Next.js 13 (stable) lays the foundations to be dynamic without limits:
Definition / Understanding
Next.js 13 includes Turbopack, the new Rust-based successor to Webpack. Webpack has been downloaded over 3 billion times. While it's been an integral part of building the Web, we've hit the limits of the maximum performance possible with JavaScript-based tooling. In Next.js 12, we began our transition to native Rust-powered tooling. We started by migrating away from Babel, which resulted in 17x faster transpilation. Then, we replaced Terser, whic