Abstract
This article records my steps about development environment setup for Typescript,Reactjs,Antd in Jan 2021.
Version
Software |
Version |
typescript |
4.1.3 |
reactjs |
17.0.1 |
antd |
4.10.2 |
Step
1 Install typescript
1
| npm install -g typescript
|
2 Create reactjs app using typescript
1
| npx create-react-app my-app --template typescript
|
3 Install antd in development directory
1 2
| cd my-app npm install antd --save
|
4 Import antd to project
4.1 Update src/App.tsx
1
| import { Button } from 'antd';
|
4.2 Update src/App.css
1
| @import '~antd/dist/antd.css';
|
5 Run and Build
5.1 Run for development
5.2 Build for deployment
Try with build
1 2
| npm install -g serve serve -s build
|