From fbfe430cf0d21513eadb7be7e9c05a6ac6d5048a Mon Sep 17 00:00:00 2001 From: TianenPang <32772271+TianenPang@users.noreply.github.com> Date: Thu, 31 Mar 2022 15:46:06 +0800 Subject: [PATCH] Docs: update react 18's overview (#35766) React 18 is now released and will have the following updates to the react 18 `overview` documentation - Links - Descriptions - Installation command --- docs/advanced-features/react-18/overview.md | 8 ++++---- docs/advanced-features/react-18/server-components.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/advanced-features/react-18/overview.md b/docs/advanced-features/react-18/overview.md index 735431c54d17ba6..83124c62fcdbf36 100644 --- a/docs/advanced-features/react-18/overview.md +++ b/docs/advanced-features/react-18/overview.md @@ -1,16 +1,16 @@ # React 18 -[React 18](https://reactjs.org/blog/2021/06/08/the-plan-for-react-18.html) 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](https://reactjs.org/blog/2022/03/29/react-v18.html) 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](/docs/api-reference/next/streaming.md) for details. -React 18 is now in Release Candidate (RC). Read more about React 18's [release plan](https://reactjs.org/blog/2021/06/08/the-plan-for-react-18.html) and discussions from the [working group](https://github.com/reactwg/react-18/discussions). +React 18 is now released. Read more about [React 18](https://reactjs.org/blog/2022/03/29/react-v18.html). ## Using React 18 with Next.js -Install the RC version of React 18: +Install the latest version of React: ```jsx -npm install next@latest react@rc react-dom@rc +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. diff --git a/docs/advanced-features/react-18/server-components.md b/docs/advanced-features/react-18/server-components.md index be4cea72957c379..265dd4cb22e4723 100644 --- a/docs/advanced-features/react-18/server-components.md +++ b/docs/advanced-features/react-18/server-components.md @@ -4,10 +4,10 @@ Server Components allow us to render React components on the server. This is fun ### Enable React Server Components -To use React Server Components, ensure you have React 18 installed: +To use React Server Components, ensure you have the latest React installed: ```jsx -npm install next@canary react@rc react-dom@rc +npm install next@canary react@latest react-dom@latest ``` Then, update your `next.config.js`: