diff --git a/packages/react-reconciler/src/ReactFiberBeginWork.js b/packages/react-reconciler/src/ReactFiberBeginWork.js index 52b9b9ebe582c..f6f92b890c948 100644 --- a/packages/react-reconciler/src/ReactFiberBeginWork.js +++ b/packages/react-reconciler/src/ReactFiberBeginWork.js @@ -1474,33 +1474,19 @@ function updateFunctionComponent( context = getMaskedContext(workInProgress, unmaskedContext); } - let nextChildren; - let hasId; prepareToReadContext(workInProgress, renderLanes); if (enableSchedulingProfiler) { markComponentRenderStarted(workInProgress); } - if (__DEV__) { - nextChildren = renderWithHooks( - current, - workInProgress, - Component, - nextProps, - context, - renderLanes, - ); - hasId = checkDidRenderIdHook(); - } else { - nextChildren = renderWithHooks( - current, - workInProgress, - Component, - nextProps, - context, - renderLanes, - ); - hasId = checkDidRenderIdHook(); - } + const nextChildren = renderWithHooks( + current, + workInProgress, + Component, + nextProps, + context, + renderLanes, + ); + const hasId = checkDidRenderIdHook(); if (enableSchedulingProfiler) { markComponentRenderStopped(); } diff --git a/packages/react-reconciler/src/ReactFiberConcurrentUpdates.js b/packages/react-reconciler/src/ReactFiberConcurrentUpdates.js index 05aeb3cfbb378..30827b5624adf 100644 --- a/packages/react-reconciler/src/ReactFiberConcurrentUpdates.js +++ b/packages/react-reconciler/src/ReactFiberConcurrentUpdates.js @@ -249,7 +249,7 @@ function markUpdateLaneFromFiberToRoot( } function getRootForUpdatedFiber(sourceFiber: Fiber): FiberRoot | null { - // TODO: We will detect and infinite update loop and throw even if this fiber + // TODO: We will detect an infinite update loop and throw even if this fiber // has already unmounted. This isn't really necessary but it happens to be the // current behavior we've used for several release cycles. Consider not // performing this check if the updated fiber already unmounted, since it's diff --git a/packages/react-reconciler/src/ReactFiberHooks.js b/packages/react-reconciler/src/ReactFiberHooks.js index 66a390ebb8150..a54833446ed4d 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.js +++ b/packages/react-reconciler/src/ReactFiberHooks.js @@ -576,7 +576,7 @@ export function renderWithHooks( // // We want memoized functions to run twice, too, so account for this, user // functions are double invoked during the *first* invocation of the component - // function, and are *not* double invoked during the second incovation: + // function, and are *not* double invoked during the second invocation: // // - First execution of component function: user functions are double invoked // - Second execution of component function (in Strict Mode, during