ES6 - Object.create() 一个让你用了就放不下的函数
摘要:"The Object.create() method creates a new object, using an existing object as the prototype of the newly created object" 官方说明了,但是与其说是new一个object,我更觉得这
阅读全文
posted @
2019-04-15 11:07
Evan086
阅读(595)
推荐(0)
React Hook 下setState的回调
摘要:背景: React 的hook出现了已经很长一段时间了,最近着手想把以前的reacrt16.5.0的代码换成hook的写法Hook以前的写法: ex: 原以为直接 然后报错了,不支持第二个参数;在react官方git上搜罗了一下解决方案https://github.com/facebook/reac
阅读全文
posted @
2019-04-12 16:05
Evan086
阅读(7882)
推荐(0)
React Profiler Chrome Tool
摘要:简单记录下chrome的react工具,Profiler如何使用1.首先不多说,你需要安装一个react的chrome的插件. 在许久之前,只有一个Element....2. 跟Chrome自带的performace很像是吧,点击录制按钮就可以开始监听,然后开始操作你想监听的react组件. 3.点
阅读全文
posted @
2019-04-11 12:19
Evan086
阅读(789)
推荐(0)
Less 编写动画
摘要:.keyframes(@fx,@fy,@tx,@ty,@name){ @keyframes @name { from { transform:translate(@fx,@fy); opacity:0; filter:alpha(opacity=0); } to { tran...
阅读全文
posted @
2019-04-10 15:37
Evan086
阅读(774)
推荐(0)