Skip to content

Commit 083af46

Browse files
committed
Fix some typos under react-reconciler package
Fixing some typos in addition to those fixed in facebook#20466 which I left them as they were
1 parent 37abf7d commit 083af46

7 files changed

+19
-19
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -484,17 +484,17 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) {
484484
name,
485485
);
486486
}
487-
if (typeof instance.componentWillRecieveProps === 'function') {
487+
if (typeof instance.componentWillReceiveProps === 'function') {
488488
console.error(
489489
'%s has a method called ' +
490-
'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
490+
'componentWillReceiveProps(). Did you mean componentWillReceiveProps()?',
491491
name,
492492
);
493493
}
494-
if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {
494+
if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
495495
console.error(
496496
'%s has a method called ' +
497-
'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?',
497+
'UNSAFE_componentWillReceiveProps(). Did you mean UNSAFE_componentWillReceiveProps()?',
498498
name,
499499
);
500500
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,17 +477,17 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) {
477477
name,
478478
);
479479
}
480-
if (typeof instance.componentWillRecieveProps === 'function') {
480+
if (typeof instance.componentWillReceiveProps === 'function') {
481481
console.error(
482482
'%s has a method called ' +
483-
'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
483+
'componentWillReceiveProps(). Did you mean componentWillReceiveProps()?',
484484
name,
485485
);
486486
}
487-
if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {
487+
if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
488488
console.error(
489489
'%s has a method called ' +
490-
'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?',
490+
'UNSAFE_componentWillReceiveProps(). Did you mean UNSAFE_componentWillReceiveProps()?',
491491
name,
492492
);
493493
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ function recursivelyCommitLayoutEffects(
555555
}
556556

557557
// case Offscreen: {
558-
// TODO: Fast path to invoke all nested layout effects when Offscren goes from hidden to visible.
558+
// TODO: Fast path to invoke all nested layout effects when Offscreen goes from hidden to visible.
559559
// break;
560560
// }
561561

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ function completeWork(
10501050
// Don't count time spent in a timed out Suspense subtree as part of the base duration.
10511051
const primaryChildFragment = workInProgress.child;
10521052
if (primaryChildFragment !== null) {
1053-
// $FlowFixMe Flow doens't support type casting in combiation with the -= operator
1053+
// $FlowFixMe Flow doesn't support type casting in combination with the -= operator
10541054
workInProgress.treeBaseDuration -= ((primaryChildFragment.treeBaseDuration: any): number);
10551055
}
10561056
}
@@ -1080,7 +1080,7 @@ function completeWork(
10801080
// Don't count time spent in a timed out Suspense subtree as part of the base duration.
10811081
const primaryChildFragment = workInProgress.child;
10821082
if (primaryChildFragment !== null) {
1083-
// $FlowFixMe Flow doens't support type casting in combiation with the -= operator
1083+
// $FlowFixMe Flow doesn't support type casting in combination with the -= operator
10841084
workInProgress.treeBaseDuration -= ((primaryChildFragment.treeBaseDuration: any): number);
10851085
}
10861086
}
@@ -1187,7 +1187,7 @@ function completeWork(
11871187
// Don't count time spent in a timed out Suspense subtree as part of the base duration.
11881188
const primaryChildFragment = workInProgress.child;
11891189
if (primaryChildFragment !== null) {
1190-
// $FlowFixMe Flow doens't support type casting in combiation with the -= operator
1190+
// $FlowFixMe Flow doesn't support type casting in combination with the -= operator
11911191
workInProgress.treeBaseDuration -= ((primaryChildFragment.treeBaseDuration: any): number);
11921192
}
11931193
}

packages/react-reconciler/src/ReactFiberFlags.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ export const LayoutMask = Update | Callback | Ref;
7474
export const PassiveMask = Passive | Deletion;
7575

7676
// Union of tags that don't get reset on clones.
77-
// This allows certain concepts to persist without recalculting them,
77+
// This allows certain concepts to persist without recalculating them,
7878
// e.g. whether a subtree contains passive effects or portals.
7979
export const StaticMask = PassiveStatic;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ type MutableSourceMemoizedState<Source, Snapshot> = {|
868868
subscribe: MutableSourceSubscribeFn<Source, Snapshot>,
869869
|};
870870

871-
function readFromUnsubcribedMutableSource<Source, Snapshot>(
871+
function readFromUnsubscribedMutableSource<Source, Snapshot>(
872872
root: FiberRoot,
873873
source: MutableSource<Source>,
874874
getSnapshot: MutableSourceGetSnapshotFn<Source, Snapshot>,
@@ -968,7 +968,7 @@ function useMutableSource<Source, Snapshot>(
968968

969969
// eslint-disable-next-line prefer-const
970970
let [currentSnapshot, setSnapshot] = dispatcher.useState(() =>
971-
readFromUnsubcribedMutableSource(root, source, getSnapshot),
971+
readFromUnsubscribedMutableSource(root, source, getSnapshot),
972972
);
973973
let snapshot = currentSnapshot;
974974

@@ -1100,7 +1100,7 @@ function useMutableSource<Source, Snapshot>(
11001100
): any);
11011101
stateHook.queue = newQueue;
11021102
stateHook.baseQueue = null;
1103-
snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot);
1103+
snapshot = readFromUnsubscribedMutableSource(root, source, getSnapshot);
11041104
stateHook.memoizedState = stateHook.baseState = snapshot;
11051105
}
11061106

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ type MutableSourceMemoizedState<Source, Snapshot> = {|
846846
subscribe: MutableSourceSubscribeFn<Source, Snapshot>,
847847
|};
848848

849-
function readFromUnsubcribedMutableSource<Source, Snapshot>(
849+
function readFromUnsubscribedMutableSource<Source, Snapshot>(
850850
root: FiberRoot,
851851
source: MutableSource<Source>,
852852
getSnapshot: MutableSourceGetSnapshotFn<Source, Snapshot>,
@@ -946,7 +946,7 @@ function useMutableSource<Source, Snapshot>(
946946

947947
// eslint-disable-next-line prefer-const
948948
let [currentSnapshot, setSnapshot] = dispatcher.useState(() =>
949-
readFromUnsubcribedMutableSource(root, source, getSnapshot),
949+
readFromUnsubscribedMutableSource(root, source, getSnapshot),
950950
);
951951
let snapshot = currentSnapshot;
952952

@@ -1078,7 +1078,7 @@ function useMutableSource<Source, Snapshot>(
10781078
): any);
10791079
stateHook.queue = newQueue;
10801080
stateHook.baseQueue = null;
1081-
snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot);
1081+
snapshot = readFromUnsubscribedMutableSource(root, source, getSnapshot);
10821082
stateHook.memoizedState = stateHook.baseState = snapshot;
10831083
}
10841084

0 commit comments

Comments
 (0)