Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -3401,7 +3401,7 @@ export function suspendResource(
}
}

export function waitForCommitToBeReady(): null | (Function => Function) {
export function waitForCommitToBeReady(): null | ((() => void) => () => void) {
if (suspendedState === null) {
throw new Error(
'Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.',
Expand Down
4 changes: 2 additions & 2 deletions packages/react-reconciler/src/ReactFiberWorkLoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,8 @@ function commitRootWhenReady(
updatedLanes,
suspendedRetryLanes,
SUSPENDED_COMMIT,
completedRenderStartTime,
completedRenderEndTime,
),
);
markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings);
Expand Down Expand Up @@ -3087,8 +3089,6 @@ function commitRoot(
ReactSharedInternals.T = prevTransition;
setCurrentUpdatePriority(previousUpdateLanePriority);
}

return null;
Copy link
Collaborator Author

@eps1lon eps1lon Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unused and mostly removed to have strict types so that commitRoot is assignable to

}

function commitRootImpl(
Expand Down
Loading