Skip to content

Commit afe6521

Browse files
cchaoniekassens
andauthored
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>
1 parent 1253462 commit afe6521

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

packages/react-reconciler/src/ReactFiberLane.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -647,11 +647,7 @@ export function markRootSuspended(root: FiberRoot, suspendedLanes: Lanes) {
647647
}
648648
}
649649

650-
export function markRootPinged(
651-
root: FiberRoot,
652-
pingedLanes: Lanes,
653-
eventTime: number,
654-
) {
650+
export function markRootPinged(root: FiberRoot, pingedLanes: Lanes) {
655651
root.pingedLanes |= root.suspendedLanes & pingedLanes;
656652
}
657653

packages/react-reconciler/src/ReactFiberWorkLoop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3369,7 +3369,7 @@ function pingSuspendedRoot(
33693369
}
33703370

33713371
const eventTime = requestEventTime();
3372-
markRootPinged(root, pingedLanes, eventTime);
3372+
markRootPinged(root, pingedLanes);
33733373

33743374
warnIfSuspenseResolutionNotWrappedWithActDEV(root);
33753375

0 commit comments

Comments
 (0)