摘要: React实现路由懒加载 https://www.runoob.com/w3cnote/free-html5-css3-loaders-preloaders.html 花蝴蝶在我身边围绕围绕,码代码我惟妙惟肖,还没抓到那诀窍,把握现在 安装:yarn add react-loadable Loada 阅读全文
posted @ 2019-11-07 14:17 写手在作画 阅读(583) 评论(0) 推荐(0) 编辑
摘要: 一、通过event对象信息的方式 二、使用ref 使用ref自定义一个属性,可以通过this.refs.属性名称.value获取内容 阅读全文
posted @ 2019-11-07 13:51 写手在作画 阅读(3176) 评论(0) 推荐(0) 编辑
摘要: Ant-design正则判断_未输入用户名和密码点击按钮提示输入 首先引入表单 import {Form,Icon,Input,Button} from 'antd' 按钮的点击事件 handleSubmit = e => { e.preventDefault(); this.props.form. 阅读全文
posted @ 2019-11-07 13:48 写手在作画 阅读(608) 评论(0) 推荐(0) 编辑
摘要: 使用react-redux,redux中放的都是组件 花蝴蝶在我身边围绕围绕,码代码我惟妙惟肖,还没抓到那诀窍 1.创建store 2.store中创建reducer 3.返回store引入reducer 4.去掉Fragment 开始获取接口数据 1.在哪里用就在哪里调用这个数据调用会用到conn 阅读全文
posted @ 2019-11-07 13:39 写手在作画 阅读(249) 评论(0) 推荐(0) 编辑
摘要: React后台管理系统 路由守卫 阅读全文
posted @ 2019-11-07 11:23 写手在作画 阅读(448) 评论(0) 推荐(0) 编辑
摘要: 回顾React回顾React style-components的基本使用 官方文档:https://www.styled-components.com/docs/basics 安装:npm install --save styled-components || yarn add styled-com 阅读全文
posted @ 2019-11-07 11:20 写手在作画 阅读(543) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-11-07 10:58 写手在作画 阅读(446) 评论(0) 推荐(0) 编辑
摘要: 长时间不用React,希望自己不要忘记了使用React的日子 1、创建脚手架: create-react-app 项目名 2、删除无用文件 3、src目录下搭配文件 4、项目需要安装的技术站 yarn add react-router-dom prop-types redux redux-thunk 阅读全文
posted @ 2019-11-07 10:54 写手在作画 阅读(400) 评论(0) 推荐(0) 编辑