01 2025 档案
摘要:https://medium.com/react-in-depth/the-how-and-why-on-reacts-usage-of-linked-list-in-fiber-67f1014d0eb7
阅读全文
摘要:React Fiber 是 React 16 引入的全新协调算法,与之前的递归栈式架构不同,Fiber 架构显著增强了 React 在性能和灵活性方面的能力。以下是 Fiber 的四个主要优点及其解释: 1. 优先级机制 Fiber 架构引入了任务的优先级调度机制,通过为不同类型的任务分配优先级,R
阅读全文
摘要:// 保存当前按下的键 let keysPressed = {}; // 监听键盘按下事件 document.addEventListener('keydown', (event) => { // 将按下的键记录到 keysPressed 对象中 keysPressed[event.key.toLo
阅读全文
摘要:console.log( '%c[XX平台] -- Login Success', 'background: dodgerblue; color: white; padding: 4px; border-radius: 4px;', );
阅读全文
摘要:网上都说操作真实 DOM 慢,但测试结果却比 React 更快,为什么? - 尤雨溪的回答 - 知乎 https://www.zhihu.com/question/31809713/answer/53544875 1. 原生 DOM 操作 vs. 通过框架封装操作。这是一个性能 vs. 可维护性的取
阅读全文
摘要:https://godbasin.github.io/front-end-playground/front-end-basic/skill/learn-front-end-develop-from-interview.html#前端项目经验相关面试考察点 React Fiber相关讲解 React
阅读全文
摘要:浏览器架构是单进程的, 单进程浏览器是指浏览器的所有功能模块都是运行在同一个进程里,这些模块包含了网络、JS引擎、渲染引擎和页面等 Chrome浏览器多进程架构:解决单进程的缺点 1.浏览器进程(主进程)(Browser Process): 界面显示、用户交互、子进程管理,同时提供存储 2.网络进程
阅读全文
摘要:3 assumptions Code is valid JavaScript Test values / properties are defined before acceessing them Code follows Rules of React React Compiler will mos
阅读全文
摘要:How does React handle updates ? How React Communicates With the Renderer ? the renderer that handles the updates setState calls renderer The Update Wh
阅读全文
摘要:React hooks allow us to use React features without writing a class state (useState, useReducer) component lifecycle (useEffect) much more(useRef, useC
阅读全文
摘要:The basic concepts of React reconciliation virtual DOM rendering diffing algorithm pre-knowledge understand the difference between React components, e
阅读全文
摘要:What is React Fiber? Fiber = {...} Fiber reconciler = current React reconciler based on Fiber (React >= 16) complete rewrite of React that fixed long-
阅读全文
摘要:<a-radio-group v-model:value="record.swtRule" name="radioGroup"> <a-radio value="1" @click="() => record.swtRule '1' ? record.swtRule = undefined : fa
阅读全文
摘要:const activeEffect = new Map() // 存储依赖关系 // 追踪依赖 const setDepsMap = (target, propKey) => { if(!activeEffect.has(target)) { activeEffect.set(target, ne
阅读全文
摘要:校验器 const target = { _id: '1024', name: 'vuejs', } // 校验器 const validators = { name(val) { return Object.prototype.toString.call(val) 'string'; }, _id
阅读全文