From aaa67b8470c1cff3069635df587ce864ef59b21b Mon Sep 17 00:00:00 2001 From: Roderic <2225803499@qq.com> Date: Sun, 15 May 2022 16:23:36 +0800 Subject: [PATCH] Update priority.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 这块更新被执行两次的应该是 u1 而不是 u2 吧 --- docs/state/priority.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/state/priority.md b/docs/state/priority.md index 360c56a..d739c35 100644 --- a/docs/state/priority.md +++ b/docs/state/priority.md @@ -130,7 +130,7 @@ fiber.updateQueue = { }; ``` -我们可以看见,`u2`对应的更新执行了两次,相应的`render阶段`的生命周期勾子`componentWillXXX`也会触发两次。这也是为什么这些勾子会被标记为`unsafe_`。 +我们可以看见,`u1`对应的更新执行了两次,相应的`render阶段`的生命周期勾子`componentWillXXX`也会触发两次。这也是为什么这些勾子会被标记为`unsafe_`。 ## 如何保证状态正确