Refactor: remove useless parameter (#25923)
## Summary I was reading the source code of `ReactFiberLane.js` and I found the third parameter of the function markRootPinged was not used. So I think we can remove it. ## How did you test this change? There is no logic changed, so I think there is no need to add unit tests. So I run `yarn test` and `yarn test --prod` locally and all tests are passed. Co-authored-by: Jan Kassens <jkassens@meta.com>
Chris committed
Jan 10, 2023 at 12:25 UTC
afe6521e134178920f0523ede4c715942d8f0564
2 files changed
+2
-6
packages/react-reconciler/src/ReactFiberLane.js
+1
-5
@@ -647,11 +647,7 @@ export function markRootSuspended(root: FiberRoot, suspendedLanes: Lanes) {
647
}
648
}
649
650
-export function markRootPinged(
651
- root: FiberRoot,
652
- pingedLanes: Lanes,
653
- eventTime: number,
654
-) {
650
+export function markRootPinged(root: FiberRoot, pingedLanes: Lanes) {
651
root.pingedLanes |= root.suspendedLanes & pingedLanes;
652
}
653
packages/react-reconciler/src/ReactFiberWorkLoop.js
+1
-1
@@ -3369,7 +3369,7 @@ function pingSuspendedRoot(
3369
}
3370
3371
const eventTime = requestEventTime();
3372
- markRootPinged(root, pingedLanes, eventTime);
3372
+ markRootPinged(root, pingedLanes);
3373
3374
warnIfSuspenseResolutionNotWrappedWithActDEV(root);
3375