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
.
React 18 is now released. Read more about React 18.
Install the latest version of React:
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.
Next.js supports React 18 streaming server-rendering (SSR) out of the box.
Learn more about streaming in Next.js.
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.
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.