mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
Reconciler: Change commitUpdate signature to account for unused updatePayload parameter (#28909)
This commit is contained in:
parent
d285b3acba
commit
82d8129e58
|
|
@ -415,13 +415,7 @@ export function commitMount(instance, type, newProps) {
|
|||
// Noop
|
||||
}
|
||||
|
||||
export function commitUpdate(
|
||||
instance,
|
||||
updatePayload,
|
||||
type,
|
||||
oldProps,
|
||||
newProps,
|
||||
) {
|
||||
export function commitUpdate(instance, type, oldProps, newProps) {
|
||||
instance._applyProps(instance, newProps, oldProps);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -702,7 +702,6 @@ export function commitMount(
|
|||
|
||||
export function commitUpdate(
|
||||
domElement: Instance,
|
||||
updatePayload: any,
|
||||
type: string,
|
||||
oldProps: Props,
|
||||
newProps: Props,
|
||||
|
|
|
|||
|
|
@ -348,7 +348,6 @@ export function commitMount(
|
|||
|
||||
export function commitUpdate(
|
||||
instance: Instance,
|
||||
updatePayloadTODO: Object,
|
||||
type: string,
|
||||
oldProps: Props,
|
||||
newProps: Props,
|
||||
|
|
|
|||
|
|
@ -651,7 +651,6 @@ function createReactNoop(reconciler: Function, useMutation: boolean) {
|
|||
|
||||
commitUpdate(
|
||||
instance: Instance,
|
||||
updatePayload: Object,
|
||||
type: string,
|
||||
oldProps: Props,
|
||||
newProps: Props,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import type {
|
|||
SuspenseInstance,
|
||||
Container,
|
||||
ChildSet,
|
||||
UpdatePayload,
|
||||
HoistableRoot,
|
||||
FormInstance,
|
||||
} from './ReactFiberConfig';
|
||||
|
|
@ -2676,14 +2675,9 @@ function commitMutationEffectsOnFiber(
|
|||
);
|
||||
}
|
||||
} else if (newResource === null && finishedWork.stateNode !== null) {
|
||||
// We may have an update on a Hoistable element
|
||||
const updatePayload: null | UpdatePayload =
|
||||
(finishedWork.updateQueue: any);
|
||||
finishedWork.updateQueue = null;
|
||||
try {
|
||||
commitUpdate(
|
||||
finishedWork.stateNode,
|
||||
updatePayload,
|
||||
finishedWork.type,
|
||||
current.memoizedProps,
|
||||
finishedWork.memoizedProps,
|
||||
|
|
@ -2754,19 +2748,8 @@ function commitMutationEffectsOnFiber(
|
|||
const oldProps =
|
||||
current !== null ? current.memoizedProps : newProps;
|
||||
const type = finishedWork.type;
|
||||
// TODO: Type the updateQueue to be specific to host components.
|
||||
const updatePayload: null | UpdatePayload =
|
||||
(finishedWork.updateQueue: any);
|
||||
finishedWork.updateQueue = null;
|
||||
try {
|
||||
commitUpdate(
|
||||
instance,
|
||||
updatePayload,
|
||||
type,
|
||||
oldProps,
|
||||
newProps,
|
||||
finishedWork,
|
||||
);
|
||||
commitUpdate(instance, type, oldProps, newProps, finishedWork);
|
||||
} catch (error) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -237,7 +237,6 @@ export const supportsMutation = true;
|
|||
|
||||
export function commitUpdate(
|
||||
instance: Instance,
|
||||
updatePayload: null | {...},
|
||||
type: string,
|
||||
oldProps: Props,
|
||||
newProps: Props,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user