From 083af46364adc83a2e001a8e07db9f019c48382c Mon Sep 17 00:00:00 2001 From: MAKSS Date: Mon, 28 Dec 2020 14:59:40 +0330 Subject: [PATCH] Fix some typos under react-reconciler package Fixing some typos in addition to those fixed in #20466 which I left them as they were --- .../react-reconciler/src/ReactFiberClassComponent.new.js | 8 ++++---- .../react-reconciler/src/ReactFiberClassComponent.old.js | 8 ++++---- packages/react-reconciler/src/ReactFiberCommitWork.new.js | 2 +- .../react-reconciler/src/ReactFiberCompleteWork.new.js | 6 +++--- packages/react-reconciler/src/ReactFiberFlags.js | 2 +- packages/react-reconciler/src/ReactFiberHooks.new.js | 6 +++--- packages/react-reconciler/src/ReactFiberHooks.old.js | 6 +++--- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberClassComponent.new.js b/packages/react-reconciler/src/ReactFiberClassComponent.new.js index 663b27dfed419..4cea21169480c 100644 --- a/packages/react-reconciler/src/ReactFiberClassComponent.new.js +++ b/packages/react-reconciler/src/ReactFiberClassComponent.new.js @@ -484,17 +484,17 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { name, ); } - if (typeof instance.componentWillRecieveProps === 'function') { + if (typeof instance.componentWillReceiveProps === 'function') { console.error( '%s has a method called ' + - 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + 'componentWillReceiveProps(). Did you mean componentWillReceiveProps()?', name, ); } - if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') { + if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') { console.error( '%s has a method called ' + - 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', + 'UNSAFE_componentWillReceiveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name, ); } diff --git a/packages/react-reconciler/src/ReactFiberClassComponent.old.js b/packages/react-reconciler/src/ReactFiberClassComponent.old.js index c5f3527419490..56b665778ca64 100644 --- a/packages/react-reconciler/src/ReactFiberClassComponent.old.js +++ b/packages/react-reconciler/src/ReactFiberClassComponent.old.js @@ -477,17 +477,17 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { name, ); } - if (typeof instance.componentWillRecieveProps === 'function') { + if (typeof instance.componentWillReceiveProps === 'function') { console.error( '%s has a method called ' + - 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + 'componentWillReceiveProps(). Did you mean componentWillReceiveProps()?', name, ); } - if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') { + if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') { console.error( '%s has a method called ' + - 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', + 'UNSAFE_componentWillReceiveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name, ); } diff --git a/packages/react-reconciler/src/ReactFiberCommitWork.new.js b/packages/react-reconciler/src/ReactFiberCommitWork.new.js index 3664803f20438..51146093ce36e 100644 --- a/packages/react-reconciler/src/ReactFiberCommitWork.new.js +++ b/packages/react-reconciler/src/ReactFiberCommitWork.new.js @@ -555,7 +555,7 @@ function recursivelyCommitLayoutEffects( } // case Offscreen: { - // TODO: Fast path to invoke all nested layout effects when Offscren goes from hidden to visible. + // TODO: Fast path to invoke all nested layout effects when Offscreen goes from hidden to visible. // break; // } diff --git a/packages/react-reconciler/src/ReactFiberCompleteWork.new.js b/packages/react-reconciler/src/ReactFiberCompleteWork.new.js index e32b0d394f5b6..c7c01ecb63df3 100644 --- a/packages/react-reconciler/src/ReactFiberCompleteWork.new.js +++ b/packages/react-reconciler/src/ReactFiberCompleteWork.new.js @@ -1050,7 +1050,7 @@ function completeWork( // Don't count time spent in a timed out Suspense subtree as part of the base duration. const primaryChildFragment = workInProgress.child; if (primaryChildFragment !== null) { - // $FlowFixMe Flow doens't support type casting in combiation with the -= operator + // $FlowFixMe Flow doesn't support type casting in combination with the -= operator workInProgress.treeBaseDuration -= ((primaryChildFragment.treeBaseDuration: any): number); } } @@ -1080,7 +1080,7 @@ function completeWork( // Don't count time spent in a timed out Suspense subtree as part of the base duration. const primaryChildFragment = workInProgress.child; if (primaryChildFragment !== null) { - // $FlowFixMe Flow doens't support type casting in combiation with the -= operator + // $FlowFixMe Flow doesn't support type casting in combination with the -= operator workInProgress.treeBaseDuration -= ((primaryChildFragment.treeBaseDuration: any): number); } } @@ -1187,7 +1187,7 @@ function completeWork( // Don't count time spent in a timed out Suspense subtree as part of the base duration. const primaryChildFragment = workInProgress.child; if (primaryChildFragment !== null) { - // $FlowFixMe Flow doens't support type casting in combiation with the -= operator + // $FlowFixMe Flow doesn't support type casting in combination with the -= operator workInProgress.treeBaseDuration -= ((primaryChildFragment.treeBaseDuration: any): number); } } diff --git a/packages/react-reconciler/src/ReactFiberFlags.js b/packages/react-reconciler/src/ReactFiberFlags.js index da8255c6e8d11..a5296d400ce96 100644 --- a/packages/react-reconciler/src/ReactFiberFlags.js +++ b/packages/react-reconciler/src/ReactFiberFlags.js @@ -74,6 +74,6 @@ export const LayoutMask = Update | Callback | Ref; export const PassiveMask = Passive | Deletion; // Union of tags that don't get reset on clones. -// This allows certain concepts to persist without recalculting them, +// This allows certain concepts to persist without recalculating them, // e.g. whether a subtree contains passive effects or portals. export const StaticMask = PassiveStatic; diff --git a/packages/react-reconciler/src/ReactFiberHooks.new.js b/packages/react-reconciler/src/ReactFiberHooks.new.js index 231b33e69bcf9..4452219443e5c 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.new.js +++ b/packages/react-reconciler/src/ReactFiberHooks.new.js @@ -868,7 +868,7 @@ type MutableSourceMemoizedState = {| subscribe: MutableSourceSubscribeFn, |}; -function readFromUnsubcribedMutableSource( +function readFromUnsubscribedMutableSource( root: FiberRoot, source: MutableSource, getSnapshot: MutableSourceGetSnapshotFn, @@ -968,7 +968,7 @@ function useMutableSource( // eslint-disable-next-line prefer-const let [currentSnapshot, setSnapshot] = dispatcher.useState(() => - readFromUnsubcribedMutableSource(root, source, getSnapshot), + readFromUnsubscribedMutableSource(root, source, getSnapshot), ); let snapshot = currentSnapshot; @@ -1100,7 +1100,7 @@ function useMutableSource( ): any); stateHook.queue = newQueue; stateHook.baseQueue = null; - snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot); + snapshot = readFromUnsubscribedMutableSource(root, source, getSnapshot); stateHook.memoizedState = stateHook.baseState = snapshot; } diff --git a/packages/react-reconciler/src/ReactFiberHooks.old.js b/packages/react-reconciler/src/ReactFiberHooks.old.js index ccd69abae6aab..f62f6cc0cfdcf 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.old.js +++ b/packages/react-reconciler/src/ReactFiberHooks.old.js @@ -846,7 +846,7 @@ type MutableSourceMemoizedState = {| subscribe: MutableSourceSubscribeFn, |}; -function readFromUnsubcribedMutableSource( +function readFromUnsubscribedMutableSource( root: FiberRoot, source: MutableSource, getSnapshot: MutableSourceGetSnapshotFn, @@ -946,7 +946,7 @@ function useMutableSource( // eslint-disable-next-line prefer-const let [currentSnapshot, setSnapshot] = dispatcher.useState(() => - readFromUnsubcribedMutableSource(root, source, getSnapshot), + readFromUnsubscribedMutableSource(root, source, getSnapshot), ); let snapshot = currentSnapshot; @@ -1078,7 +1078,7 @@ function useMutableSource( ): any); stateHook.queue = newQueue; stateHook.baseQueue = null; - snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot); + snapshot = readFromUnsubscribedMutableSource(root, source, getSnapshot); stateHook.memoizedState = stateHook.baseState = snapshot; }