You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent:
case Block:
{
// At this point layout effects have already been destroyed (during mutation phase).
// This is done to prevent sibling component effects from interfering with each other,
// e.g. a destroy function in one component should never override a ref set
// by a create function in another component during the same commit.
{
commitHookEffectListMount(Layout | HasEffect, finishedWork);
}
schedulePassiveEffects(finishedWork);
return;
}
The text was updated successfully, but these errors were encountered:
beforeMutation阶段
就讲过,before mutation阶段在scheduleCallback中调度flushPassiveEffects
而在layout阶段
说
光从以上两段论述中,是不是可以说 useEffect的相关回调在beforeMutation和layout两个阶段都被调用了啊
17.0.2源码我大概看了下 对应位置的代码似乎变成了:
The text was updated successfully, but these errors were encountered: