From 9f5c9b9dec699c851bb03314e6068ec6bae0aa42 Mon Sep 17 00:00:00 2001 From: Varun Date: Thu, 23 Apr 2026 23:54:47 +0530 Subject: [PATCH] Fix typos in warning messages, comments, and DevTools function names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ecountered → encountered (ReactFizzConfigDOM.js) - deduplciate → deduplicate (ReactFizzConfigDOM.js, ReactDOMResourceValidation.js) - ocurred → occurred (ReactFizzConfigDOM.js) - ocurring → occurring (ReactFiberWorkLoop.js) - supression → suppression (ReactFiberHydrationContext.js) - aquireHostInstance → acquireHostInstance (renderer.js) - aquireHostResource → acquireHostResource (renderer.js) --- .../src/backend/fiber/renderer.js | 14 +++++++------- .../src/server/ReactFizzConfigDOM.js | 8 ++++---- .../src/shared/ReactDOMResourceValidation.js | 2 +- .../src/ReactFiberHydrationContext.js | 2 +- .../react-reconciler/src/ReactFiberWorkLoop.js | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/react-devtools-shared/src/backend/fiber/renderer.js b/packages/react-devtools-shared/src/backend/fiber/renderer.js index 037ce1c5cc3b..0defe6fc32de 100644 --- a/packages/react-devtools-shared/src/backend/fiber/renderer.js +++ b/packages/react-devtools-shared/src/backend/fiber/renderer.js @@ -330,7 +330,7 @@ const hostResourceToDevToolsInstanceMap: Map< Set, > = new Map(); -function aquireHostInstance( +function acquireHostInstance( nearestInstance: DevToolsInstance, hostInstance: HostInstance, ): void { @@ -350,7 +350,7 @@ function releaseHostInstance( } } -function aquireHostResource( +function acquireHostResource( nearestInstance: DevToolsInstance, resource: ?{instance?: HostInstance}, ): void { @@ -3486,7 +3486,7 @@ export function attach( if (nearestInstance === null) { throw new Error('Did not expect a host hoistable to be the root'); } - aquireHostResource(nearestInstance, fiber.memoizedState); + acquireHostResource(nearestInstance, fiber.memoizedState); trackDebugInfoFromHostResource(nearestInstance, fiber); } else if ( fiber.tag === HostComponent || @@ -3497,7 +3497,7 @@ export function attach( if (nearestInstance === null) { throw new Error('Did not expect a host hoistable to be the root'); } - aquireHostInstance(nearestInstance, fiber.stateNode); + acquireHostInstance(nearestInstance, fiber.stateNode); trackDebugInfoFromHostComponent(nearestInstance, fiber); } @@ -4468,7 +4468,7 @@ export function attach( } if (prevFiber.memoizedState !== nextFiber.memoizedState) { releaseHostResource(nearestInstance, prevFiber.memoizedState); - aquireHostResource(nearestInstance, nextFiber.memoizedState); + acquireHostResource(nearestInstance, nextFiber.memoizedState); } trackDebugInfoFromHostResource(nearestInstance, nextFiber); } else if ( @@ -4482,10 +4482,10 @@ export function attach( } if (prevFiber.stateNode !== nextFiber.stateNode) { // In persistent mode, it's possible for the stateNode to update with - // a new clone. In that case we need to release the old one and aquire + // a new clone. In that case we need to release the old one and acquire // new one instead. releaseHostInstance(nearestInstance, prevFiber.stateNode); - aquireHostInstance(nearestInstance, nextFiber.stateNode); + acquireHostInstance(nearestInstance, nextFiber.stateNode); } trackDebugInfoFromHostComponent(nearestInstance, nextFiber); } diff --git a/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js b/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js index 691e49e563fd..e31d02415e38 100644 --- a/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js +++ b/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js @@ -2874,7 +2874,7 @@ function pushLink( if (rel === 'stylesheet' && typeof props.precedence === 'string') { if (typeof href !== 'string' || !href) { console.error( - 'React encountered a `` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.', + 'React encountered a `` with a `precedence` prop and expected the `href` prop to be a non-empty string but encountered %s instead. If your intent was to have React hoist and deduplicate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.', getValueDescriptorExpectingObjectForWarning(href), ); } @@ -2900,7 +2900,7 @@ function pushLink( if (typeof precedence === 'string') { if (props.disabled != null) { console.error( - 'React encountered a `` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.', + 'React encountered a `` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplicate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.', ); } else if (props.onLoad || props.onError) { const propDescription = @@ -2910,7 +2910,7 @@ function pushLink( ? '`onLoad` prop' : '`onError` prop'; console.error( - 'React encountered a `` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.', + 'React encountered a `` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplicate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.', propDescription, propDescription, ); @@ -3114,7 +3114,7 @@ function pushStyle( if (__DEV__) { if (href.includes(' ')) { console.error( - 'React expected the `href` prop for a