Skip to content

Remove unused parameters from react-reconciler files #26576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/react-reconciler/src/ReactChildFiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function coerceRef(
return mixedRef;
}

function throwOnInvalidObjectType(returnFiber: Fiber, newChild: Object) {
function throwOnInvalidObjectType(newChild: Object) {
// $FlowFixMe[method-unbinding]
const childString = Object.prototype.toString.call(newChild);

Expand Down Expand Up @@ -589,7 +589,7 @@ function createChildReconciler(
);
}

throwOnInvalidObjectType(returnFiber, newChild);
throwOnInvalidObjectType(newChild);
}

if (__DEV__) {
Expand Down Expand Up @@ -680,7 +680,7 @@ function createChildReconciler(
);
}

throwOnInvalidObjectType(returnFiber, newChild);
throwOnInvalidObjectType(newChild);
}

if (__DEV__) {
Expand Down Expand Up @@ -770,7 +770,7 @@ function createChildReconciler(
);
}

throwOnInvalidObjectType(returnFiber, newChild);
throwOnInvalidObjectType(newChild);
}

if (__DEV__) {
Expand Down Expand Up @@ -1455,7 +1455,7 @@ function createChildReconciler(
);
}

throwOnInvalidObjectType(returnFiber, newChild);
throwOnInvalidObjectType(newChild);
}

if (
Expand Down
8 changes: 2 additions & 6 deletions packages/react-reconciler/src/ReactFiberBeginWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -1625,11 +1625,7 @@ function updateHostComponent(
return workInProgress.child;
}

function updateHostHoistable(
current: null | Fiber,
workInProgress: Fiber,
renderLanes: Lanes,
) {
function updateHostHoistable(current: null | Fiber, workInProgress: Fiber) {
markRef(current, workInProgress);
const currentProps = current === null ? null : current.memoizedProps;
const resource = (workInProgress.memoizedState = getResource(
Expand Down Expand Up @@ -4086,7 +4082,7 @@ function beginWork(
return updateHostRoot(current, workInProgress, renderLanes);
case HostHoistable:
if (enableFloat && supportsResources) {
return updateHostHoistable(current, workInProgress, renderLanes);
return updateHostHoistable(current, workInProgress);
}
// Fall through
case HostSingleton:
Expand Down
2 changes: 0 additions & 2 deletions packages/react-reconciler/src/ReactFiberClassUpdateQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ export function enqueueCapturedUpdate<State>(

function getStateFromUpdate<State>(
workInProgress: Fiber,
queue: UpdateQueue<State>,
update: Update<State>,
prevState: State,
nextProps: any,
Expand Down Expand Up @@ -593,7 +592,6 @@ export function processUpdateQueue<State>(
// Process this update.
newState = getStateFromUpdate(
workInProgress,
queue,
update,
newState,
props,
Expand Down
2 changes: 0 additions & 2 deletions packages/react-reconciler/src/ReactFiberCommitWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,6 @@ function abortRootTransitions(
abort: TransitionAbort,
deletedTransitions: Set<Transition>,
deletedOffscreenInstance: OffscreenInstance | null,
isInDeletedTree: boolean,
) {
if (enableTransitionTracing) {
const rootTransitions = root.incompleteTransitions;
Expand Down Expand Up @@ -1371,7 +1370,6 @@ function abortParentMarkerTransitionsForDeletedFiber(
abort,
deletedTransitions,
deletedOffscreenInstance,
isInDeletedTree,
);

break;
Expand Down
16 changes: 2 additions & 14 deletions packages/react-reconciler/src/ReactFiberCompleteWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,6 @@ function preloadInstanceAndSuspendIfNeeded(
workInProgress: Fiber,
type: Type,
props: Props,
renderLanes: Lanes,
) {
if (!maySuspendCommit(type, props)) {
// If this flag was set previously, we can remove it. The flag
Expand Down Expand Up @@ -1122,12 +1121,7 @@ function completeWork(

// This must come at the very end of the complete phase.
bubbleProperties(workInProgress);
preloadInstanceAndSuspendIfNeeded(
workInProgress,
type,
newProps,
renderLanes,
);
preloadInstanceAndSuspendIfNeeded(workInProgress, type, newProps);
return null;
}
} else {
Expand Down Expand Up @@ -1174,12 +1168,7 @@ function completeWork(

// This must come at the very end of the complete phase.
bubbleProperties(workInProgress);
preloadInstanceAndSuspendIfNeeded(
workInProgress,
type,
newProps,
renderLanes,
);
preloadInstanceAndSuspendIfNeeded(workInProgress, type, newProps);
return null;
}
}
Expand Down Expand Up @@ -1335,7 +1324,6 @@ function completeWork(
workInProgress,
workInProgress.type,
workInProgress.pendingProps,
renderLanes,
);
return null;
}
Expand Down