Merge pull request #49 from lionel178/main

feat: react 合成事件
pull/50/head^2
yck 2021-09-15 14:13:47 +08:00 committed by GitHub
commit 378d76f3bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 1 deletions

View File

@ -202,7 +202,7 @@ JS 数据类型分为两大类及八种数据类型,注意别漏了 ES6 新增
- [ ] [JavaScript 深入之继承的多种方式和优缺点](https://github.com/mqyqingfeng/Blog/issues/16)
- [ ] [JavaScript 中的继承](https://medium.com/@happymishra66/inheritance-in-javascript-21d2b82ffa6f),需自备梯子
- [ ] [JS 类继承](https://javascript.info/class-inheritance),另有 [中文翻译版](https://zh.javascript.info/class-inheritance)
### 垃圾回收
JavaScrip 在变量被创建时分配内存,并在对象不再使用时自动释放内存,这个过程被称为垃圾回收。另外我们主要学习 V8 引擎下的垃圾回收机制。
@ -214,6 +214,20 @@ JavaScrip 在变量被创建时分配内存,并在对象不再使用时自动
- [ ] [GC in v8](https://github.com/lrlna/sketchin/blob/master/guides/garbage-collection-in-v8.md)
- [ ] [JavaScript 工作原理:内存管理 + 处理常见的 4 种内存泄漏](https://blog.sessionstack.com/how-javascript-works-memory-management-how-to-handle-4-common-memory-leaks-3f28b94cfbec),另有[中文版](https://juejin.cn/post/6844903519078580238)
## React
### 合成事件
合成事件SyntheticEvent是 React 模拟原生 DOM 事件所有能力的一个事件对象即浏览器原生事件的跨浏览器包装器。React 根据 [W3C规范](https://www.w3.org/TR/DOM-Level-3-Events/) 定义了合成事件。需要注意的是 v16 和 17 版本中的合成事件有差异。
- [ ] 文档
- [ ] [React官方文档](https://reactjs.org/docs/events.html)
- [ ] 推荐文章
- [ ] [探索 React 合成事件](https://segmentfault.com/a/1190000038251163)
- [ ] [大佬怎么办升级React17Toast组件不能用了](https://zhuanlan.zhihu.com/p/380941094)
- [ ] [Whats the Difference Between Synthetic React Events and JavaScript Events?](https://betterprogramming.pub/whats-the-difference-between-synthetic-react-events-and-javascript-events-ba7dbc742294),需自备梯子
- [ ] [React 17 removes event pooling in the modern browsers](https://blog.saeloun.com/2021/04/06/react-17-removes-event-pooling-in-modern-system.html)
## 跨端框架
跨端的最主要的含义就是一套代码多端运行,减少重复劳动