摘要: ① useEffect相当于componentDidMount和componentDidUpdate两个生命周期函数 ②useEffect是异步的 解绑生命周期函数 componentDidMount 阅读全文
posted @ 2019-11-13 17:19 秋风渡明月 阅读(5148) 评论(0) 推荐(0) 编辑
摘要: import React, { useState } from 'react'; // Hook 写法 function App2 () { const [count,setCount] = useState(0) return ( <div> <h2>点击{count}</h2> <button 阅读全文
posted @ 2019-11-13 15:30 秋风渡明月 阅读(159) 评论(0) 推荐(0) 编辑
摘要: ① ②通过this.props重定向 阅读全文
posted @ 2019-11-13 08:49 秋风渡明月 阅读(1248) 评论(0) 推荐(0) 编辑
摘要: ① 定义规则 ②传值 ③获取传过来的值 阅读全文
posted @ 2019-11-12 17:50 秋风渡明月 阅读(966) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-11-12 17:01 秋风渡明月 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 当做固定写法吧 截图里少一个括号,已代码为主 import {createStore,applyMiddleware,compose} from 'redux' import thunk from 'redux-thunk' import reducer from './reducer' const 阅读全文
posted @ 2019-11-12 14:18 秋风渡明月 阅读(397) 评论(0) 推荐(0) 编辑
摘要: 写的太过杂乱,仅供个人查阅 <template> <div> <div class="popout"></div> <div id="lq_audits"> <div class="header"> <span>日志详情</span> <span class="header_span el-icon 阅读全文
posted @ 2019-11-12 09:21 秋风渡明月 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 命名使用注意事项: https://www.jb51.net/article/160227.htm 阅读全文
posted @ 2019-11-12 09:17 秋风渡明月 阅读(490) 评论(0) 推荐(0) 编辑
摘要: 输入值改变reducer里的值 通过store.dispatch传入reducer中,函数的第二个参数可以接收到 在reducer中 在todolist文件中 然后在把this.state中的值改变 阅读全文
posted @ 2019-11-11 15:42 秋风渡明月 阅读(225) 评论(0) 推荐(0) 编辑
摘要: JSON.parse(JSON.stringify()) 实现对对象的深拷贝 阅读全文
posted @ 2019-11-11 14:36 秋风渡明月 阅读(105) 评论(0) 推荐(0) 编辑