@@ -325,14 +325,10 @@ function ChildReconciler(shouldTrackSideEffects) {
325
325
return existingChildren ;
326
326
}
327
327
328
- function useFiber (
329
- fiber : Fiber ,
330
- pendingProps : mixed ,
331
- expirationTime : ExpirationTime ,
332
- ) : Fiber {
328
+ function useFiber ( fiber : Fiber , pendingProps : mixed ) : Fiber {
333
329
// We currently set sibling to null and index to 0 here because it is easy
334
330
// to forget to do before returning it. E.g. for the single child case.
335
- const clone = createWorkInProgress ( fiber , pendingProps , expirationTime ) ;
331
+ const clone = createWorkInProgress ( fiber , pendingProps ) ;
336
332
clone . index = 0 ;
337
333
clone . sibling = null ;
338
334
return clone ;
@@ -392,7 +388,7 @@ function ChildReconciler(shouldTrackSideEffects) {
392
388
return created ;
393
389
} else {
394
390
// Update
395
- const existing = useFiber ( current , textContent , expirationTime ) ;
391
+ const existing = useFiber ( current , textContent ) ;
396
392
existing . return = returnFiber ;
397
393
return existing ;
398
394
}
@@ -411,7 +407,7 @@ function ChildReconciler(shouldTrackSideEffects) {
411
407
( __DEV__ ? isCompatibleFamilyForHotReloading ( current , element ) : false )
412
408
) {
413
409
// Move based on index
414
- const existing = useFiber ( current , element . props , expirationTime ) ;
410
+ const existing = useFiber ( current , element . props ) ;
415
411
existing . ref = coerceRef ( returnFiber , current , element ) ;
416
412
existing . return = returnFiber ;
417
413
if ( __DEV__ ) {
@@ -426,7 +422,7 @@ function ChildReconciler(shouldTrackSideEffects) {
426
422
element . type . render === current . type . render
427
423
) {
428
424
// Same as above but also update the .type field.
429
- const existing = useFiber ( current , element . props , expirationTime ) ;
425
+ const existing = useFiber ( current , element . props ) ;
430
426
existing . return = returnFiber ;
431
427
existing . type = element . type ;
432
428
if ( __DEV__ ) {
@@ -469,7 +465,7 @@ function ChildReconciler(shouldTrackSideEffects) {
469
465
return created ;
470
466
} else {
471
467
// Update
472
- const existing = useFiber ( current , portal . children || [ ] , expirationTime ) ;
468
+ const existing = useFiber ( current , portal . children || [ ] ) ;
473
469
existing . return = returnFiber ;
474
470
return existing ;
475
471
}
@@ -494,7 +490,7 @@ function ChildReconciler(shouldTrackSideEffects) {
494
490
return created ;
495
491
} else {
496
492
// Update
497
- const existing = useFiber ( current , fragment , expirationTime ) ;
493
+ const existing = useFiber ( current , fragment ) ;
498
494
existing . return = returnFiber ;
499
495
return existing ;
500
496
}
@@ -1137,7 +1133,7 @@ function ChildReconciler(shouldTrackSideEffects) {
1137
1133
// We already have an existing node so let's just update it and delete
1138
1134
// the rest.
1139
1135
deleteRemainingChildren ( returnFiber , currentFirstChild . sibling ) ;
1140
- const existing = useFiber ( currentFirstChild , textContent , expirationTime ) ;
1136
+ const existing = useFiber ( currentFirstChild , textContent ) ;
1141
1137
existing . return = returnFiber ;
1142
1138
return existing ;
1143
1139
}
@@ -1169,11 +1165,7 @@ function ChildReconciler(shouldTrackSideEffects) {
1169
1165
case Fragment : {
1170
1166
if ( element . type === REACT_FRAGMENT_TYPE ) {
1171
1167
deleteRemainingChildren ( returnFiber , child . sibling ) ;
1172
- const existing = useFiber (
1173
- child ,
1174
- element . props . children ,
1175
- expirationTime ,
1176
- ) ;
1168
+ const existing = useFiber ( child , element . props . children ) ;
1177
1169
existing . return = returnFiber ;
1178
1170
if ( __DEV__ ) {
1179
1171
existing . _debugSource = element . _source ;
@@ -1190,7 +1182,7 @@ function ChildReconciler(shouldTrackSideEffects) {
1190
1182
element . type . render === child . type . render
1191
1183
) {
1192
1184
deleteRemainingChildren ( returnFiber , child . sibling ) ;
1193
- const existing = useFiber ( child , element . props , expirationTime ) ;
1185
+ const existing = useFiber ( child , element . props ) ;
1194
1186
existing . type = element . type ;
1195
1187
existing . return = returnFiber ;
1196
1188
if ( __DEV__ ) {
@@ -1211,7 +1203,7 @@ function ChildReconciler(shouldTrackSideEffects) {
1211
1203
: false )
1212
1204
) {
1213
1205
deleteRemainingChildren ( returnFiber , child . sibling ) ;
1214
- const existing = useFiber ( child , element . props , expirationTime ) ;
1206
+ const existing = useFiber ( child , element . props ) ;
1215
1207
existing . ref = coerceRef ( returnFiber , child , element ) ;
1216
1208
existing . return = returnFiber ;
1217
1209
if ( __DEV__ ) {
@@ -1271,11 +1263,7 @@ function ChildReconciler(shouldTrackSideEffects) {
1271
1263
child . stateNode . implementation === portal . implementation
1272
1264
) {
1273
1265
deleteRemainingChildren ( returnFiber , child . sibling ) ;
1274
- const existing = useFiber (
1275
- child ,
1276
- portal . children || [ ] ,
1277
- expirationTime ,
1278
- ) ;
1266
+ const existing = useFiber ( child , portal . children || [ ] ) ;
1279
1267
existing . return = returnFiber ;
1280
1268
return existing ;
1281
1269
} else {
@@ -1441,11 +1429,7 @@ export function cloneChildFibers(
1441
1429
}
1442
1430
1443
1431
let currentChild = workInProgress . child ;
1444
- let newChild = createWorkInProgress (
1445
- currentChild ,
1446
- currentChild . pendingProps ,
1447
- currentChild . expirationTime ,
1448
- ) ;
1432
+ let newChild = createWorkInProgress ( currentChild , currentChild . pendingProps ) ;
1449
1433
workInProgress . child = newChild ;
1450
1434
1451
1435
newChild . return = workInProgress ;
@@ -1454,7 +1438,6 @@ export function cloneChildFibers(
1454
1438
newChild = newChild . sibling = createWorkInProgress (
1455
1439
currentChild ,
1456
1440
currentChild . pendingProps ,
1457
- currentChild . expirationTime ,
1458
1441
) ;
1459
1442
newChild . return = workInProgress ;
1460
1443
}
0 commit comments