styled-components
CSS in JS:
yarn add @types/styled-components -D; yarn add styled-components;
react-router-dom
react路由:
yarn add @types/react-router-dom -D; yarn add react-router-dom;
redux
yarn add react-redux redux @reduxjs/toolkit; yarn add @types/react-redux -D;
axios
yarn add axios;
dotenv-cli
yarn add --D dotenv-cli
跨域问题
yarn add http-proxy-middleware
引入antd
yarn add antd
# 修改 src/App.css,在文件顶部引入 antd 的样式。
@import '~antd/dist/antd.css';
创建项目
npx create-react-app react-ts --template typescript;