Skip to content

Commit

Permalink
chore: update Next.js docs (ant-design#45907)
Browse files Browse the repository at this point in the history
* docs: update Nextjs docs

* Update use-with-next.en-US.md

Signed-off-by: lijianan <[email protected]>

* Update use-with-next.zh-CN.md

Signed-off-by: lijianan <[email protected]>

* update

* Update use-with-next.en-US.md

Signed-off-by: lijianan <[email protected]>

* Update use-with-next.zh-CN.md

Signed-off-by: lijianan <[email protected]>

---------

Signed-off-by: lijianan <[email protected]>
  • Loading branch information
li-jia-nan authored Nov 16, 2023
1 parent 2dda417 commit efbaf8d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/react/use-with-next.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<InstallDependencies npm='$ npm install @ant-design/cssinjs --save' yarn='$ yarn add @ant-design/cssinjs' pnpm='$ pnpm install @ant-design/cssinjs --save'></InstallDependencies>

2. Create `lib/AntdRegistry.tsx`
Expand Down Expand Up @@ -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)
<InstallDependencies npm='$ npm install @ant-design/cssinjs --save' yarn='$ yarn add @ant-design/cssinjs' pnpm='$ pnpm install @ant-design/cssinjs --save'></InstallDependencies>

2. Rewrite `pages/_document.tsx`
Expand Down
8 changes: 8 additions & 0 deletions docs/react/use-with-next.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` 命令查看本地版本)
<InstallDependencies npm='$ npm install @ant-design/cssinjs --save' yarn='$ yarn add @ant-design/cssinjs' pnpm='$ pnpm install @ant-design/cssinjs --save'></InstallDependencies>

2. 创建 `lib/AntdRegistry.tsx`
Expand Down Expand Up @@ -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` 命令查看本地版本)
<InstallDependencies npm='$ npm install @ant-design/cssinjs --save' yarn='$ yarn add @ant-design/cssinjs' pnpm='$ pnpm install @ant-design/cssinjs --save'></InstallDependencies>

2. 改写 `pages/_document.tsx`
Expand Down

0 comments on commit efbaf8d

Please sign in to comment.