@samitouri / QOS-React / commits / 82d8129e58

Reconciler: Change `commitUpdate` signature to account for unused `updatePayload` parameter (#28909)

Sebastian Silbermann committed Apr 25, 2024 at 19:14 UTC 82d8129e585cccff30cc0f5fe1bbee6082dd36a5
6 files changed +2 -29
packages/react-art/src/ReactFiberConfigART.js
+1 -7
@@ -415,13 +415,7 @@ export function commitMount(instance, type, newProps) {
415 // Noop
416 }
417
418 -export function commitUpdate(
419 - instance,
420 - updatePayload,
421 - type,
422 - oldProps,
423 - newProps,
424 -) {
418 +export function commitUpdate(instance, type, oldProps, newProps) {
419 instance._applyProps(instance, newProps, oldProps);
420 }
421
packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
-1
@@ -702,7 +702,6 @@ export function commitMount(
702
703 export function commitUpdate(
704 domElement: Instance,
705 - updatePayload: any,
705 type: string,
706 oldProps: Props,
707 newProps: Props,
packages/react-native-renderer/src/ReactFiberConfigNative.js
-1
@@ -348,7 +348,6 @@ export function commitMount(
348
349 export function commitUpdate(
350 instance: Instance,
351 - updatePayloadTODO: Object,
351 type: string,
352 oldProps: Props,
353 newProps: Props,
packages/react-noop-renderer/src/createReactNoop.js
-1
@@ -651,7 +651,6 @@ function createReactNoop(reconciler: Function, useMutation: boolean) {
651
652 commitUpdate(
653 instance: Instance,
654 - updatePayload: Object,
654 type: string,
655 oldProps: Props,
656 newProps: Props,
packages/react-reconciler/src/ReactFiberCommitWork.js
+1 -18
@@ -13,7 +13,6 @@ import type {
13 SuspenseInstance,
14 Container,
15 ChildSet,
16 - UpdatePayload,
16 HoistableRoot,
17 FormInstance,
18 } from './ReactFiberConfig';
@@ -2676,14 +2675,9 @@ function commitMutationEffectsOnFiber(
2675 );
2676 }
2677 } else if (newResource === null && finishedWork.stateNode !== null) {
2679 - // We may have an update on a Hoistable element
2680 - const updatePayload: null | UpdatePayload =
2681 - (finishedWork.updateQueue: any);
2682 - finishedWork.updateQueue = null;
2678 try {
2679 commitUpdate(
2680 finishedWork.stateNode,
2686 - updatePayload,
2681 finishedWork.type,
2682 current.memoizedProps,
2683 finishedWork.memoizedProps,
@@ -2754,19 +2748,8 @@ function commitMutationEffectsOnFiber(
2748 const oldProps =
2749 current !== null ? current.memoizedProps : newProps;
2750 const type = finishedWork.type;
2757 - // TODO: Type the updateQueue to be specific to host components.
2758 - const updatePayload: null | UpdatePayload =
2759 - (finishedWork.updateQueue: any);
2760 - finishedWork.updateQueue = null;
2751 try {
2762 - commitUpdate(
2763 - instance,
2764 - updatePayload,
2765 - type,
2766 - oldProps,
2767 - newProps,
2768 - finishedWork,
2769 - );
2752 + commitUpdate(instance, type, oldProps, newProps, finishedWork);
2753 } catch (error) {
2754 captureCommitPhaseError(finishedWork, finishedWork.return, error);
2755 }
packages/react-test-renderer/src/ReactFiberConfigTestHost.js
-1
@@ -237,7 +237,6 @@ export const supportsMutation = true;
237
238 export function commitUpdate(
239 instance: Instance,
240 - updatePayload: null | {...},
240 type: string,
241 oldProps: Props,
242 newProps: Props,