Skip to content

Commit 48d475c

Browse files
bowen31337Bowen Li
and
Bowen Li
authored
correct typos (#22294)
Co-authored-by: Bowen Li <bowen31337@gmail.com>
1 parent fc57432 commit 48d475c

7 files changed

+19
-19
lines changed

packages/react-reconciler/src/ReactFiberWorkLoop.new.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2668,7 +2668,7 @@ if (__DEV__ && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
26682668
}
26692669
}
26702670
// 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.
26722672
throw originalError;
26732673
}
26742674
};

packages/react-reconciler/src/ReactFiberWorkLoop.old.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2668,7 +2668,7 @@ if (__DEV__ && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
26682668
}
26692669
}
26702670
// 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.
26722672
throw originalError;
26732673
}
26742674
};

packages/react-reconciler/src/__tests__/ReactCache-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ describe('ReactCache', () => {
461461
expect(Scheduler).toHaveYielded(['A [v1]']);
462462
expect(root).toMatchRenderedOutput('A [v1]');
463463

464-
// Fefresh for new data.
464+
// Refresh for new data.
465465
await act(async () => {
466466
startTransition(() => refresh());
467467
});

packages/react-reconciler/src/__tests__/ReactIncrementalErrorHandling-test.internal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ describe('ReactIncrementalErrorHandling', () => {
990990
expect(Scheduler).toFlushAndYield(['Foo']);
991991
});
992992

993-
it('can schedule updates after uncaught error during umounting', () => {
993+
it('can schedule updates after uncaught error during unmounting', () => {
994994
class BrokenComponentWillUnmount extends React.Component {
995995
render() {
996996
return <div />;

packages/react-reconciler/src/__tests__/ReactSuspenseEffectsSemantics-test.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
10191019
await advanceTimers(1000);
10201020

10211021
// 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.
10231023
expect(Scheduler).toHaveYielded([
10241024
'Text:Outer destroy layout',
10251025
'Text:MemoizedInner destroy layout',
@@ -1147,7 +1147,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
11471147
span('OuterFallback'),
11481148
]);
11491149

1150-
// Show the inner Susepnse subtree (no effects should be recreated)
1150+
// Show the inner Suspense subtree (no effects should be recreated)
11511151
await act(async () => {
11521152
await resolveText('InnerAsync_1');
11531153
});
@@ -1189,7 +1189,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
11891189
span('OuterFallback'),
11901190
]);
11911191

1192-
// Show the outer Susepnse subtree (only outer effects should be recreated)
1192+
// Show the outer Suspense subtree (only outer effects should be recreated)
11931193
await act(async () => {
11941194
await resolveText('OuterAsync_1');
11951195
});
@@ -1213,7 +1213,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
12131213
span('InnerFallback'),
12141214
]);
12151215

1216-
// Show the inner Susepnse subtree (only inner effects should be recreated)
1216+
// Show the inner Suspense subtree (only inner effects should be recreated)
12171217
await act(async () => {
12181218
await resolveText('InnerAsync_2');
12191219
});
@@ -1517,7 +1517,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
15171517
span('Outside'),
15181518
]);
15191519

1520-
// Resolving both resources should cleanup fallabck effects and recreate main effects
1520+
// Resolving both resources should cleanup fallback effects and recreate main effects
15211521
await act(async () => {
15221522
await resolveText('FallbackAsync');
15231523
await resolveText('OutsideAsync');
@@ -1974,7 +1974,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
19741974
'ThrowsInWillUnmount componentWillUnmount',
19751975
'Text:Inside destroy layout',
19761976

1977-
// Finish the in-progess commit
1977+
// Finish the in-progress commit
19781978
'Text:Fallback create layout',
19791979
'Text:Fallback create passive',
19801980

@@ -2114,7 +2114,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
21142114
'ThrowsInLayoutEffect useLayoutEffect create',
21152115
'Text:Inside create layout',
21162116

2117-
// Finish the in-progess commit
2117+
// Finish the in-progress commit
21182118
'Text:Fallback destroy passive',
21192119
'AsyncText:Async create passive',
21202120

@@ -2139,7 +2139,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
21392139
// @gate enableSuspenseLayoutEffectSemantics
21402140
// @gate enableCache
21412141
// @gate replayFailedUnitOfWorkWithInvokeGuardedCallback
2142-
it('are properly handled for layout effect descruction', async () => {
2142+
it('are properly handled for layout effect destruction', async () => {
21432143
function ThrowsInLayoutEffectDestroy() {
21442144
Scheduler.unstable_yieldValue('ThrowsInLayoutEffectDestroy render');
21452145
React.useLayoutEffect(() => {
@@ -2226,7 +2226,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
22262226
'ThrowsInLayoutEffectDestroy useLayoutEffect destroy',
22272227
'Text:Inside destroy layout',
22282228

2229-
// Finish the in-progess commit
2229+
// Finish the in-progress commit
22302230
'Text:Fallback create layout',
22312231
'Text:Fallback create passive',
22322232

packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
16281628
});
16291629
expect(root).toMatchRenderedOutput('Loading...');
16301630

1631-
// Unmount everying
1631+
// Unmount everything
16321632
await act(async () => {
16331633
root.render(null);
16341634
});
@@ -2677,7 +2677,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
26772677
});
26782678
});
26792679

2680-
describe('delays transitions when using React.startTranistion', () => {
2680+
describe('delays transitions when using React.startTransition', () => {
26812681
// @gate enableCache
26822682
it('top level render', async () => {
26832683
function App({page}) {
@@ -3360,7 +3360,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
33603360
// In the expiration times model, once the high pri update suspends,
33613361
// we can't be sure if there's additional work at a lower priority
33623362
// 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
33643364
// to the fallback). So we try rendering one more time, just in case.
33653365
// TODO: We shouldn't need to do this with lanes, because we always
33663366
// know exactly which lanes have pending work in each tree.

packages/react-reconciler/src/__tests__/ReactUpdatePriority-test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ describe('ReactUpdatePriority', () => {
5454
let setDefaultState;
5555
function App() {
5656
const [idleState, setIdleState] = useState(1);
57-
const [defaultState, _setDetaultState] = useState(1);
58-
setDefaultState = _setDetaultState;
57+
const [defaultState, _setDefaultState] = useState(1);
58+
setDefaultState = _setDefaultState;
5959
useEffect(() => {
6060
Scheduler.unstable_yieldValue('Idle update');
6161
setIdleState(2);
@@ -86,7 +86,7 @@ describe('ReactUpdatePriority', () => {
8686
expect(Scheduler).toHaveYielded(['Idle: 2, Default: 2']);
8787
});
8888

89-
test('continuous updates should interrupt transisions', async () => {
89+
test('continuous updates should interrupt transitions', async () => {
9090
const root = ReactNoop.createRoot();
9191

9292
let setCounter;

0 commit comments

Comments
 (0)