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
// If the new child is undefined, and the return fiber is a composite
1331
-
// component, throw an error. If Fiber return types are disabled,
1332
-
// we already threw above.
1331
+
// If the new child is undefined, and the return fiber is a composite component, throw an error. If Fiber return types are disabled, we already threw above.
@@ -2243,6 +2248,9 @@ function commitMutationEffectsOnFiber(finishedWork: Fiber, root: FiberRoot) {
2243
2248
}
2244
2249
}
2245
2250
2251
+
// 下面的switch语句只关心放置、更新和删除。
2252
+
// 为了避免需要为每个可能的位图值添加一个案例,我们从效果标签中删除了辅助效果并打开该值。
2253
+
2246
2254
// The following switch statement is only concerned about placement,
2247
2255
// updates, and deletions. To avoid needing to add a case for every possible
2248
2256
// bitmap value, we remove the secondary effects from the effect tag and
@@ -2600,17 +2608,7 @@ function commitPassiveUnmountEffects_begin() {
2600
2608
}
2601
2609
2602
2610
if(deletedTreeCleanUpLevel>=1){
2603
-
// A fiber was deleted from this parent fiber, but it's still part of
2604
-
// the previous (alternate) parent fiber's list of children. Because
2605
-
// children are a linked list, an earlier sibling that's still alive
2606
-
// will be connected to the deleted fiber via its `alternate`:
2607
-
//
2608
-
// live fiber
2609
-
// --alternate--> previous live fiber
2610
-
// --sibling--> deleted fiber
2611
-
//
2612
-
// We can't disconnect `alternate` on nodes that haven't been deleted
2613
-
// yet, but we can disconnect the `sibling` and `child` pointers.
2611
+
// A fiber was deleted from this parent fiber, but it's still part of the previous (alternate) parent fiber's list of children. Because children are a linked list, an earlier sibling that's still alive will be connected to the deleted fiber via its `alternate`: live fiber --alternate--> previous live fiber --sibling--> deleted fiber We can't disconnect `alternate` on nodes that haven't been deleted yet, but we can disconnect the `sibling` and `child` pointers.
// Transfer the interleaved updates onto the main queue. Each queue has a `pending` field and an `interleaved` field. When they are not null, they point to the last node in a circular linked list. We need to append the interleaved list to the end of the pending list by joining them into a single, circular list.
37
+
35
38
// Transfer the interleaved updates onto the main queue. Each queue has a
36
39
// `pending` field and an `interleaved` field. When they are not null, they
37
40
// point to the last node in a circular linked list. We need to append the
0 commit comments