From efbaf8d186205ae9bdd20032fe17c7adae93afe9 Mon Sep 17 00:00:00 2001
From: lijianan <574980606@qq.com>
Date: Thu, 16 Nov 2023 20:14:27 +0800
Subject: [PATCH] chore: update Next.js docs (#45907)
* docs: update Nextjs docs
* Update use-with-next.en-US.md
Signed-off-by: lijianan <574980606@qq.com>
* Update use-with-next.zh-CN.md
Signed-off-by: lijianan <574980606@qq.com>
* update
* Update use-with-next.en-US.md
Signed-off-by: lijianan <574980606@qq.com>
* Update use-with-next.zh-CN.md
Signed-off-by: lijianan <574980606@qq.com>
---------
Signed-off-by: lijianan <574980606@qq.com>
---
docs/react/use-with-next.en-US.md | 8 ++++++++
docs/react/use-with-next.zh-CN.md | 8 ++++++++
2 files changed, 16 insertions(+)
diff --git a/docs/react/use-with-next.en-US.md b/docs/react/use-with-next.en-US.md
index ba17657503..4d88094df7 100644
--- a/docs/react/use-with-next.en-US.md
+++ b/docs/react/use-with-next.en-US.md
@@ -57,6 +57,10 @@ If you are using the App Router in Next.js and using antd as your component libr
1. Install `@ant-design/cssinjs`
+> Notes for developers
+>
+> Please note that when you install `@ant-design/cssinjs`, you must ensure that the version is consistent with the version of `@ant-design/cssinjs` in local `node_modules` of `antd`, otherwise, multiple React instances will appear, resulting in ctx being unable to be read correctly. (Tips: you can use `npm ls @ant-design/cssinjs` command to view the local version)
+
2. Create `lib/AntdRegistry.tsx`
@@ -159,6 +163,10 @@ If you are using the Pages Router in Next.js and using antd as your component li
1. Install `@ant-design/cssinjs`
+> Notes for developers
+>
+> Please note that when you install `@ant-design/cssinjs`, you must ensure that the version is consistent with the version of `@ant-design/cssinjs` in local `node_modules` of `antd`, otherwise, multiple React instances will appear, resulting in ctx being unable to be read correctly. (Tips: you can use `npm ls @ant-design/cssinjs` command to view the local version)
+
2. Rewrite `pages/_document.tsx`
diff --git a/docs/react/use-with-next.zh-CN.md b/docs/react/use-with-next.zh-CN.md
index eee7b29211..23ae50f8e3 100644
--- a/docs/react/use-with-next.zh-CN.md
+++ b/docs/react/use-with-next.zh-CN.md
@@ -57,6 +57,10 @@ export default Home;
1. 安装 `@ant-design/cssinjs`
+> 开发者注意事项:
+>
+> 请注意,安装 `@ant-design/cssinjs` 时必须确保版本号跟 `antd` 本地的 `node_modules` 中的 `@ant-design/cssinjs` 版本保持一致,否则会出现多个 React 实例,导致无法正确的读取 ctx。(Tips: 你可以通过 `npm ls @ant-design/cssinjs` 命令查看本地版本)
+
2. 创建 `lib/AntdRegistry.tsx`
@@ -159,6 +163,10 @@ export default HomePage;
1. 安装 `@ant-design/cssinjs`
+> 开发者注意事项:
+>
+> 请注意,安装 `@ant-design/cssinjs` 时必须确保版本号跟 `antd` 本地的 `node_modules` 中的 `@ant-design/cssinjs` 版本保持一致,否则会出现多个 React 实例,导致无法正确的读取 ctx。(Tips: 你可以通过 `npm ls @ant-design/cssinjs` 命令查看本地版本)
+
2. 改写 `pages/_document.tsx`