diff --git a/docs/react/use-with-create-react-app.en-US.md b/docs/react/use-with-create-react-app.en-US.md index 839714918f..81ad83252b 100644 --- a/docs/react/use-with-create-react-app.en-US.md +++ b/docs/react/use-with-create-react-app.en-US.md @@ -148,7 +148,7 @@ $ yarn add babel-plugin-import --dev Remove the `@import '~antd/dist/antd.css';` statement added before because `babel-plugin-import` will import styles and import components like below: ```diff - // scr/App.js + // src/App.js import React, { Component } from 'react'; - import Button from 'antd/lib/button'; + import { Button } from 'antd'; diff --git a/docs/react/use-with-create-react-app.zh-CN.md b/docs/react/use-with-create-react-app.zh-CN.md index b5cc50cdf3..5da78b3d97 100644 --- a/docs/react/use-with-create-react-app.zh-CN.md +++ b/docs/react/use-with-create-react-app.zh-CN.md @@ -145,7 +145,7 @@ $ yarn add babel-plugin-import --dev 然后移除前面在 `src/App.css` 里全量添加的 `@import '~antd/dist/antd.css';` 样式代码,并且按下面的格式引入模块。 ```diff - // scr/App.js + // src/App.js import React, { Component } from 'react'; - import Button from 'antd/lib/button'; + import { Button } from 'antd';