just-react icon indicating copy to clipboard operation
just-react copied to clipboard

「React技术揭秘」 一本自顶向下的React源码分析书

Results 74 just-react issues
Sort by recently updated
recently updated
newest added
trafficstars

在看卡老师的电子书的 render阶段章节[https://kasong.gitee.io/just-react/process/fiber.html](https://kasong.gitee.io/just-react/process/fiber.html),发现有一处地方好像和官方文档[https://reactjs.org/docs/faq-internals.html](https://reactjs.org/docs/faq-internals.html)有点点不一样: 1、卡老师的书中提到:“虚拟DOM在React中有个正式的称呼——Fiber。 ...... 我们会逐渐用 Fiber 来取代 React 16 虚拟DOM 这一称呼”: ![image](https://user-images.githubusercontent.com/15014595/127620020-5cae1826-e832-4a09-88cc-1d978fd31dd1.png) 2、但是官方文档提到:React 的“虚拟DOM”的实现其实包含了 React Element 和 fiber 两者: ![image](https://user-images.githubusercontent.com/15014595/127620061-141fd6c7-0716-4194-943d-d940ab24764c.png)

如题?请问如何付费?因为无法注册,没有电话。谢谢。

架构篇/completeWork/effectList章节, react 17.0.3版本 completeUnitOfWork里面并没有effectList的代码逻辑,。老卡,文档得更新了

Can someone please point me to an English translation of this book

向右移动这个概念有些笼统,在我第一次阅读的时候不明了向右移动几位,还是移动到头。多次模拟后才知道需要移动到lastPlacedIndex位置

此处描述应为 rootFiber。

```js if (hook.queue.pending) { let firstUpdate = hook.queue.pending.next; do { const action = firstUpdate.action; baseState = action(baseState); firstUpdate = firstUpdate.next; } while (firstUpdate !== hook.queue.pending) hook.queue.pending = null; } ```...

目前React关于Scheduler设计存在两个队列:保存未就绪任务timerQueue和保存已就绪任务taskQueue,每次调度时会判断未就绪任务是否已就绪,是加入到taskQueue。但是从过期时间的角度来看,貌似这种设计有点冗余,如果把延迟的任务也转换为过期时间,然后放在统一的任务队列(假设是taskQueue),统一走最小堆的维护和取值策略,那是不是也能满足需求,并且逻辑上也更简单点