@samitouri / QOS-React-2 / commits / 48d475c9ed

correct typos (#22294)

Co-authored-by: Bowen Li <bowen31337@gmail.com>

Bowen committed Sep 22, 2021 at 01:05 UTC 48d475c9ed20ab4344b3f1969716b76d8a476171
7 files changed +19 -19
packages/react-reconciler/src/ReactFiberWorkLoop.new.js
+1 -1
@@ -2668,7 +2668,7 @@ if (__DEV__ && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
2668 }
2669 }
2670 // We always throw the original error in case the second render pass is not idempotent.
2671 - // This can happen if a memoized function or CommonJS module doesn't throw after first invokation.
2671 + // This can happen if a memoized function or CommonJS module doesn't throw after first invocation.
2672 throw originalError;
2673 }
2674 };
packages/react-reconciler/src/ReactFiberWorkLoop.old.js
+1 -1
@@ -2668,7 +2668,7 @@ if (__DEV__ && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
2668 }
2669 }
2670 // We always throw the original error in case the second render pass is not idempotent.
2671 - // This can happen if a memoized function or CommonJS module doesn't throw after first invokation.
2671 + // This can happen if a memoized function or CommonJS module doesn't throw after first invocation.
2672 throw originalError;
2673 }
2674 };
packages/react-reconciler/src/__tests__/ReactCache-test.js
+1 -1
@@ -461,7 +461,7 @@ describe('ReactCache', () => {
461 expect(Scheduler).toHaveYielded(['A [v1]']);
462 expect(root).toMatchRenderedOutput('A [v1]');
463
464 - // Fefresh for new data.
464 + // Refresh for new data.
465 await act(async () => {
466 startTransition(() => refresh());
467 });
packages/react-reconciler/src/__tests__/ReactIncrementalErrorHandling-test.internal.js
+1 -1
@@ -990,7 +990,7 @@ describe('ReactIncrementalErrorHandling', () => {
990 expect(Scheduler).toFlushAndYield(['Foo']);
991 });
992
993 - it('can schedule updates after uncaught error during umounting', () => {
993 + it('can schedule updates after uncaught error during unmounting', () => {
994 class BrokenComponentWillUnmount extends React.Component {
995 render() {
996 return <div />;
packages/react-reconciler/src/__tests__/ReactSuspenseEffectsSemantics-test.js
+9 -9
@@ -1019,7 +1019,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
1019 await advanceTimers(1000);
1020
1021 // Timing out should commit the fallback and destroy inner layout effects.
1022 - // Even though the innermost layout effects are beneat a hidden HostComponent.
1022 + // Even though the innermost layout effects are beneath a hidden HostComponent.
1023 expect(Scheduler).toHaveYielded([
1024 'Text:Outer destroy layout',
1025 'Text:MemoizedInner destroy layout',
@@ -1147,7 +1147,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
1147 span('OuterFallback'),
1148 ]);
1149
1150 - // Show the inner Susepnse subtree (no effects should be recreated)
1150 + // Show the inner Suspense subtree (no effects should be recreated)
1151 await act(async () => {
1152 await resolveText('InnerAsync_1');
1153 });
@@ -1189,7 +1189,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
1189 span('OuterFallback'),
1190 ]);
1191
1192 - // Show the outer Susepnse subtree (only outer effects should be recreated)
1192 + // Show the outer Suspense subtree (only outer effects should be recreated)
1193 await act(async () => {
1194 await resolveText('OuterAsync_1');
1195 });
@@ -1213,7 +1213,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
1213 span('InnerFallback'),
1214 ]);
1215
1216 - // Show the inner Susepnse subtree (only inner effects should be recreated)
1216 + // Show the inner Suspense subtree (only inner effects should be recreated)
1217 await act(async () => {
1218 await resolveText('InnerAsync_2');
1219 });
@@ -1517,7 +1517,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
1517 span('Outside'),
1518 ]);
1519
1520 - // Resolving both resources should cleanup fallabck effects and recreate main effects
1520 + // Resolving both resources should cleanup fallback effects and recreate main effects
1521 await act(async () => {
1522 await resolveText('FallbackAsync');
1523 await resolveText('OutsideAsync');
@@ -1974,7 +1974,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
1974 'ThrowsInWillUnmount componentWillUnmount',
1975 'Text:Inside destroy layout',
1976
1977 - // Finish the in-progess commit
1977 + // Finish the in-progress commit
1978 'Text:Fallback create layout',
1979 'Text:Fallback create passive',
1980
@@ -2114,7 +2114,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
2114 'ThrowsInLayoutEffect useLayoutEffect create',
2115 'Text:Inside create layout',
2116
2117 - // Finish the in-progess commit
2117 + // Finish the in-progress commit
2118 'Text:Fallback destroy passive',
2119 'AsyncText:Async create passive',
2120
@@ -2139,7 +2139,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
2139 // @gate enableSuspenseLayoutEffectSemantics
2140 // @gate enableCache
2141 // @gate replayFailedUnitOfWorkWithInvokeGuardedCallback
2142 - it('are properly handled for layout effect descruction', async () => {
2142 + it('are properly handled for layout effect destruction', async () => {
2143 function ThrowsInLayoutEffectDestroy() {
2144 Scheduler.unstable_yieldValue('ThrowsInLayoutEffectDestroy render');
2145 React.useLayoutEffect(() => {
@@ -2226,7 +2226,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
2226 'ThrowsInLayoutEffectDestroy useLayoutEffect destroy',
2227 'Text:Inside destroy layout',
2228
2229 - // Finish the in-progess commit
2229 + // Finish the in-progress commit
2230 'Text:Fallback create layout',
2231 'Text:Fallback create passive',
2232
packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.js
+3 -3
@@ -1628,7 +1628,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
1628 });
1629 expect(root).toMatchRenderedOutput('Loading...');
1630
1631 - // Unmount everying
1631 + // Unmount everything
1632 await act(async () => {
1633 root.render(null);
1634 });
@@ -2677,7 +2677,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
2677 });
2678 });
2679
2680 - describe('delays transitions when using React.startTranistion', () => {
2680 + describe('delays transitions when using React.startTransition', () => {
2681 // @gate enableCache
2682 it('top level render', async () => {
2683 function App({page}) {
@@ -3360,7 +3360,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
3360 // In the expiration times model, once the high pri update suspends,
3361 // we can't be sure if there's additional work at a lower priority
3362 // that might unblock the tree. We do know that there's a lower
3363 - // priority update *somehwere* in the entire root, though (the update
3363 + // priority update *somewhere* in the entire root, though (the update
3364 // to the fallback). So we try rendering one more time, just in case.
3365 // TODO: We shouldn't need to do this with lanes, because we always
3366 // know exactly which lanes have pending work in each tree.
packages/react-reconciler/src/__tests__/ReactUpdatePriority-test.js
+3 -3
@@ -54,8 +54,8 @@ describe('ReactUpdatePriority', () => {
54 let setDefaultState;
55 function App() {
56 const [idleState, setIdleState] = useState(1);
57 - const [defaultState, _setDetaultState] = useState(1);
58 - setDefaultState = _setDetaultState;
57 + const [defaultState, _setDefaultState] = useState(1);
58 + setDefaultState = _setDefaultState;
59 useEffect(() => {
60 Scheduler.unstable_yieldValue('Idle update');
61 setIdleState(2);
@@ -86,7 +86,7 @@ describe('ReactUpdatePriority', () => {
86 expect(Scheduler).toHaveYielded(['Idle: 2, Default: 2']);
87 });
88
89 - test('continuous updates should interrupt transisions', async () => {
89 + test('continuous updates should interrupt transitions', async () => {
90 const root = ReactNoop.createRoot();
91
92 let setCounter;