![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
react
路人甲小码
这个作者很懒,什么都没留下…
展开
-
react学习Day3:项目中按需引入antd
一、使用 npm 安装 npm install antd --save 二、按需导入 npm install babel-plugin-import --save-dev 在webpack.config.js中配置 [ "import",{libraryName:"antd",style:'css'} ] 三、组件中使用原创 2020-07-14 11:56:42 · 162 阅读 · 0 评论 -
react学习Day2:安装配置路由
一、react-dom和react-router-dom React-router提供了一些router的核心api,包括Router,Route,Switch等,但是它没有提供dom操作进行跳转的api. React-router-dom提供了BrowserRouter,Route,Link,Switch等api,可以通过dom的事件控制路由 二、安装依赖 npm install react-router-dom --save-dev 三、App.js中引入路由 import React from 'r原创 2020-07-13 14:00:27 · 137 阅读 · 1 评论 -
react学习Day1:安装react
一、使用 create-react-app 快速构建 React 开发环境 create-react-app 是来自于 Facebook,通过该命令我们无需配置就能快速构建 React 开发环境。 create-react-app 自动创建的项目是基于 Webpack + ES6 。 执行以下命令创建项目: cnpm install -g create-react-app create-react-app my-app "my-app表示创建的应用名称" cd my-app/ npm st原创 2020-07-10 17:52:52 · 175 阅读 · 1 评论