Appearance
React 18
React 18 adds new features including Suspense, automatic batching of updates, APIs like startTransition
, and a new streaming API for server rendering with support for React.lazy
. Next.js also provides streaming related APIs, please checkout next/streaming for details.
React 18 is now released. Read more about React 18.
Using React 18 with Next.js
Install the latest version of React:
jsx
npm install next@latest react@latest react-dom@latest
You can now start using React 18's new APIs like startTransition
and Suspense
in Next.js.
Streaming SSR
Next.js supports React 18 streaming server-rendering (SSR) out of the box.
Learn more about streaming in Next.js.
React Server Components (Alpha)
Server Components are a new feature in React that let you reduce your JavaScript bundle size by separating server and client-side code. Server Components allow developers to build apps that span the server and client, combining the rich interactivity of client-side apps with the improved performance of traditional server rendering.
Server Components are still in research and development. Learn how to try Server Components as an experimental feature in Next.js.
Switchable Runtime (Alpha)
Next.js supports changing the runtime of your application between Node.js and the Edge Runtime at the page level. For example, you can selectively configure specific pages to be server-side rendered in the Edge Runtime.
This feature is still experimental. Learn more about the switchable runtime.