Skip to content

Commit

Permalink
correct typos (#22294)
Browse files Browse the repository at this point in the history
Co-authored-by: Bowen Li <bowen31337@gmail.com>
  • Loading branch information
bowen31337 and Bowen Li authored Sep 21, 2021
1 parent fc57432 commit 48d475c
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberWorkLoop.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberWorkLoop.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/__tests__/ReactCache-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <div />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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');
});
Expand Down Expand Up @@ -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');
});
Expand All @@ -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');
});
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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',

Expand Down Expand Up @@ -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',

Expand All @@ -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(() => {
Expand Down Expand Up @@ -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',

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
});
expect(root).toMatchRenderedOutput('Loading...');

// Unmount everying
// Unmount everything
await act(async () => {
root.render(null);
});
Expand Down Expand Up @@ -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}) {
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 48d475c

Please sign in to comment.