摘要: 零.不用redux方法: 目录:src: component: count: //reducers 每一个组件都得有一个reducers。 index.jsx//(store只有一个。)this,setState({count: count+value*1 } ) // 上面的value是字符串,* 阅读全文
posted @ 2021-02-08 17:30 程序员草莓 阅读(73) 评论(0) 推荐(0) 编辑
摘要: const a = () => 1 const.log(a()) ; // console.log(a()) :1 const a = b => 1+b const.log(a(9)) ; // console.log(a()) :10 返回一个对象:{}是默认成为一个函数, const a = b 阅读全文
posted @ 2021-02-08 17:15 程序员草莓 阅读(70) 评论(0) 推荐(0) 编辑
摘要: git 面试大全: https://blog.nowcoder.net/n/253163e1ac1d482db6482fc7f6522586 https://segmentfault.com/a/1190000019315509 https://blog.csdn.net/nobody_1/arti 阅读全文
posted @ 2021-02-08 16:33 程序员草莓 阅读(815) 评论(0) 推荐(0) 编辑
摘要: 解决思路就是: 保存 state_copy = state. 2 state赋值后 重新挂载。但是出现的问题就是页面上 保留了残值,没有刷新。 或者就是案件直接调用api,然后一次调用8个api全部清空。 第一种失败的原因: 一种是,state_copy需要深拷贝,浅拷贝 , 导致state_cop 阅读全文
posted @ 2021-02-08 11:21 程序员草莓 阅读(84) 评论(0) 推荐(0) 编辑