1.引用axios
npm i --save axios
2.react路由
npm i --save react-router-dom
3.安装antd
npm install antd --save
4.安装antd图标
npm install --save @ant-design/icons
5.node.js清空缓存
npm cache clean -f
======================================
1.全局安装脚手架
npm i -g create-react-app
2.查看版本
create-react-app --version
3.创建项目
create-react-app myapp
4.进入启动项目
cd myapp 进入项目目录
npm start 启动项目
本文介绍了如何通过npm包管理工具安装axios进行API请求、react-router实现页面导航,以及使用antd构建UI组件,并清理node缓存。步骤包括全局脚手架配置、版本检查、创建并启动React应用。
1405

被折叠的 条评论
为什么被折叠?



