diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js index 00d38a2cbe8d8..ac420850fae82 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js @@ -2668,7 +2668,7 @@ if (__DEV__ && replayFailedUnitOfWorkWithInvokeGuardedCallback) { } } // We always throw the original error in case the second render pass is not idempotent. - // This can happen if a memoized function or CommonJS module doesn't throw after first invokation. + // This can happen if a memoized function or CommonJS module doesn't throw after first invocation. throw originalError; } }; diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js index 2561d865b0e80..c98c7abac71fe 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js @@ -2668,7 +2668,7 @@ if (__DEV__ && replayFailedUnitOfWorkWithInvokeGuardedCallback) { } } // We always throw the original error in case the second render pass is not idempotent. - // This can happen if a memoized function or CommonJS module doesn't throw after first invokation. + // This can happen if a memoized function or CommonJS module doesn't throw after first invocation. throw originalError; } }; diff --git a/packages/react-reconciler/src/__tests__/ReactCache-test.js b/packages/react-reconciler/src/__tests__/ReactCache-test.js index 4f6caa4c6a80e..77b77869c782c 100644 --- a/packages/react-reconciler/src/__tests__/ReactCache-test.js +++ b/packages/react-reconciler/src/__tests__/ReactCache-test.js @@ -461,7 +461,7 @@ describe('ReactCache', () => { expect(Scheduler).toHaveYielded(['A [v1]']); expect(root).toMatchRenderedOutput('A [v1]'); - // Fefresh for new data. + // Refresh for new data. await act(async () => { startTransition(() => refresh()); }); diff --git a/packages/react-reconciler/src/__tests__/ReactIncrementalErrorHandling-test.internal.js b/packages/react-reconciler/src/__tests__/ReactIncrementalErrorHandling-test.internal.js index 2d6ad2a97524e..716771a3778dd 100644 --- a/packages/react-reconciler/src/__tests__/ReactIncrementalErrorHandling-test.internal.js +++ b/packages/react-reconciler/src/__tests__/ReactIncrementalErrorHandling-test.internal.js @@ -990,7 +990,7 @@ describe('ReactIncrementalErrorHandling', () => { expect(Scheduler).toFlushAndYield(['Foo']); }); - it('can schedule updates after uncaught error during umounting', () => { + it('can schedule updates after uncaught error during unmounting', () => { class BrokenComponentWillUnmount extends React.Component { render() { return
; diff --git a/packages/react-reconciler/src/__tests__/ReactSuspenseEffectsSemantics-test.js b/packages/react-reconciler/src/__tests__/ReactSuspenseEffectsSemantics-test.js index 6cb3c60971538..bdda4f8313dfa 100644 --- a/packages/react-reconciler/src/__tests__/ReactSuspenseEffectsSemantics-test.js +++ b/packages/react-reconciler/src/__tests__/ReactSuspenseEffectsSemantics-test.js @@ -1019,7 +1019,7 @@ describe('ReactSuspenseEffectsSemantics', () => { await advanceTimers(1000); // Timing out should commit the fallback and destroy inner layout effects. - // Even though the innermost layout effects are beneat a hidden HostComponent. + // Even though the innermost layout effects are beneath a hidden HostComponent. expect(Scheduler).toHaveYielded([ 'Text:Outer destroy layout', 'Text:MemoizedInner destroy layout', @@ -1147,7 +1147,7 @@ describe('ReactSuspenseEffectsSemantics', () => { span('OuterFallback'), ]); - // Show the inner Susepnse subtree (no effects should be recreated) + // Show the inner Suspense subtree (no effects should be recreated) await act(async () => { await resolveText('InnerAsync_1'); }); @@ -1189,7 +1189,7 @@ describe('ReactSuspenseEffectsSemantics', () => { span('OuterFallback'), ]); - // Show the outer Susepnse subtree (only outer effects should be recreated) + // Show the outer Suspense subtree (only outer effects should be recreated) await act(async () => { await resolveText('OuterAsync_1'); }); @@ -1213,7 +1213,7 @@ describe('ReactSuspenseEffectsSemantics', () => { span('InnerFallback'), ]); - // Show the inner Susepnse subtree (only inner effects should be recreated) + // Show the inner Suspense subtree (only inner effects should be recreated) await act(async () => { await resolveText('InnerAsync_2'); }); @@ -1517,7 +1517,7 @@ describe('ReactSuspenseEffectsSemantics', () => { span('Outside'), ]); - // Resolving both resources should cleanup fallabck effects and recreate main effects + // Resolving both resources should cleanup fallback effects and recreate main effects await act(async () => { await resolveText('FallbackAsync'); await resolveText('OutsideAsync'); @@ -1974,7 +1974,7 @@ describe('ReactSuspenseEffectsSemantics', () => { 'ThrowsInWillUnmount componentWillUnmount', 'Text:Inside destroy layout', - // Finish the in-progess commit + // Finish the in-progress commit 'Text:Fallback create layout', 'Text:Fallback create passive', @@ -2114,7 +2114,7 @@ describe('ReactSuspenseEffectsSemantics', () => { 'ThrowsInLayoutEffect useLayoutEffect create', 'Text:Inside create layout', - // Finish the in-progess commit + // Finish the in-progress commit 'Text:Fallback destroy passive', 'AsyncText:Async create passive', @@ -2139,7 +2139,7 @@ describe('ReactSuspenseEffectsSemantics', () => { // @gate enableSuspenseLayoutEffectSemantics // @gate enableCache // @gate replayFailedUnitOfWorkWithInvokeGuardedCallback - it('are properly handled for layout effect descruction', async () => { + it('are properly handled for layout effect destruction', async () => { function ThrowsInLayoutEffectDestroy() { Scheduler.unstable_yieldValue('ThrowsInLayoutEffectDestroy render'); React.useLayoutEffect(() => { @@ -2226,7 +2226,7 @@ describe('ReactSuspenseEffectsSemantics', () => { 'ThrowsInLayoutEffectDestroy useLayoutEffect destroy', 'Text:Inside destroy layout', - // Finish the in-progess commit + // Finish the in-progress commit 'Text:Fallback create layout', 'Text:Fallback create passive', diff --git a/packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.js b/packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.js index 960c52506ab03..6c0b4076e6187 100644 --- a/packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.js +++ b/packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.js @@ -1628,7 +1628,7 @@ describe('ReactSuspenseWithNoopRenderer', () => { }); expect(root).toMatchRenderedOutput('Loading...'); - // Unmount everying + // Unmount everything await act(async () => { root.render(null); }); @@ -2677,7 +2677,7 @@ describe('ReactSuspenseWithNoopRenderer', () => { }); }); - describe('delays transitions when using React.startTranistion', () => { + describe('delays transitions when using React.startTransition', () => { // @gate enableCache it('top level render', async () => { function App({page}) { @@ -3360,7 +3360,7 @@ describe('ReactSuspenseWithNoopRenderer', () => { // In the expiration times model, once the high pri update suspends, // we can't be sure if there's additional work at a lower priority // that might unblock the tree. We do know that there's a lower - // priority update *somehwere* in the entire root, though (the update + // priority update *somewhere* in the entire root, though (the update // to the fallback). So we try rendering one more time, just in case. // TODO: We shouldn't need to do this with lanes, because we always // know exactly which lanes have pending work in each tree. diff --git a/packages/react-reconciler/src/__tests__/ReactUpdatePriority-test.js b/packages/react-reconciler/src/__tests__/ReactUpdatePriority-test.js index 4e3b44df255dd..44cd0860a5c65 100644 --- a/packages/react-reconciler/src/__tests__/ReactUpdatePriority-test.js +++ b/packages/react-reconciler/src/__tests__/ReactUpdatePriority-test.js @@ -54,8 +54,8 @@ describe('ReactUpdatePriority', () => { let setDefaultState; function App() { const [idleState, setIdleState] = useState(1); - const [defaultState, _setDetaultState] = useState(1); - setDefaultState = _setDetaultState; + const [defaultState, _setDefaultState] = useState(1); + setDefaultState = _setDefaultState; useEffect(() => { Scheduler.unstable_yieldValue('Idle update'); setIdleState(2); @@ -86,7 +86,7 @@ describe('ReactUpdatePriority', () => { expect(Scheduler).toHaveYielded(['Idle: 2, Default: 2']); }); - test('continuous updates should interrupt transisions', async () => { + test('continuous updates should interrupt transitions', async () => { const root = ReactNoop.createRoot(); let setCounter;