7kms/react-illustration-series

effect hooks图例的构造顺序是否有问题

Jinminrui opened this issue · 2 comments

大佬你好,在下面这篇文章中
https://github.com/7kms/react-illustration-series/blob/main/docs/main/hook-effect.md
image
从下面这张图里看 hooks 的书写顺序应该是 1 ,2 ,3
image
而 componentUpdateQueue.lastEffect 指向的应该是最后一个effect
image
所以这里不是很明白。

你是对的

7kms commented

是的哈,谢谢指正,连线确实错误。
fiber.updateQueue.lastEffect指向的是最新的effect。 图上来讲的话,应该指向链表中的最后一个