mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
rename ReactFiberContext to ReactFiberLegacyContext (#33622)
It wasn't immediately obvious to me, that all the exports here are related to legacy context, so renaming for clarity. Modern context lives in `ReactFiberNewContext` which we could probably also raname in a separate step to just Context.
This commit is contained in:
+1
-1
@@ -236,7 +236,7 @@ import {
|
||||
isContextProvider as isLegacyContextProvider,
|
||||
pushTopLevelContextObject,
|
||||
invalidateContextProvider,
|
||||
} from './ReactFiberContext';
|
||||
} from './ReactFiberLegacyContext';
|
||||
import {
|
||||
getIsHydrating,
|
||||
enterHydrationState,
|
||||
|
||||
@@ -53,7 +53,7 @@ import {
|
||||
getUnmaskedContext,
|
||||
hasContextChanged,
|
||||
emptyContextObject,
|
||||
} from './ReactFiberContext';
|
||||
} from './ReactFiberLegacyContext';
|
||||
import {readContext, checkIfContextChanged} from './ReactFiberNewContext';
|
||||
import {requestUpdateLane, scheduleUpdateOnFiber} from './ReactFiberWorkLoop';
|
||||
import {
|
||||
@@ -695,7 +695,7 @@ function constructClassInstance(
|
||||
}
|
||||
|
||||
// Cache unmasked context so we can avoid recreating masked context unless necessary.
|
||||
// ReactFiberContext usually updates this cache but can't for newly-created instances.
|
||||
// ReactFiberLegacyContext usually updates this cache but can't for newly-created instances.
|
||||
if (isLegacyContextConsumer) {
|
||||
cacheContext(workInProgress, unmaskedContext, context);
|
||||
}
|
||||
|
||||
+1
-1
@@ -150,7 +150,7 @@ import {
|
||||
isContextProvider as isLegacyContextProvider,
|
||||
popContext as popLegacyContext,
|
||||
popTopLevelContextObject as popTopLevelLegacyContextObject,
|
||||
} from './ReactFiberContext';
|
||||
} from './ReactFiberLegacyContext';
|
||||
import {popProvider} from './ReactFiberNewContext';
|
||||
import {
|
||||
prepareToHydrateHostInstance,
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import {
|
||||
} from './ReactFiberWorkLoop';
|
||||
import {enqueueConcurrentRenderForLane} from './ReactFiberConcurrentUpdates';
|
||||
import {updateContainerSync} from './ReactFiberReconciler';
|
||||
import {emptyContextObject} from './ReactFiberContext';
|
||||
import {emptyContextObject} from './ReactFiberLegacyContext';
|
||||
import {SyncLane} from './ReactFiberLane';
|
||||
import {
|
||||
ClassComponent,
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ import {
|
||||
processChildContext,
|
||||
emptyContextObject,
|
||||
isContextProvider as isLegacyContextProvider,
|
||||
} from './ReactFiberContext';
|
||||
} from './ReactFiberLegacyContext';
|
||||
import {createFiberRoot} from './ReactFiberRoot';
|
||||
import {isRootDehydrated} from './ReactFiberShellHydration';
|
||||
import {
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ import {
|
||||
isContextProvider as isLegacyContextProvider,
|
||||
popContext as popLegacyContext,
|
||||
popTopLevelContextObject as popTopLevelLegacyContextObject,
|
||||
} from './ReactFiberContext';
|
||||
} from './ReactFiberLegacyContext';
|
||||
import {popProvider} from './ReactFiberNewContext';
|
||||
import {popCacheProvider} from './ReactFiberCacheComponent';
|
||||
import {transferActualDuration} from './ReactProfilerTimer';
|
||||
|
||||
+1
-1
@@ -357,7 +357,7 @@ import {
|
||||
flushSyncWorkOnLegacyRootsOnly,
|
||||
requestTransitionLane,
|
||||
} from './ReactFiberRootScheduler';
|
||||
import {getMaskedContext, getUnmaskedContext} from './ReactFiberContext';
|
||||
import {getMaskedContext, getUnmaskedContext} from './ReactFiberLegacyContext';
|
||||
import {logUncaughtError} from './ReactFiberErrorLogger';
|
||||
import {
|
||||
deleteScheduledGesture,
|
||||
|
||||
Reference in New Issue
Block a user