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:
Jan Kassens
2025-06-23 17:21:18 -04:00
committed by GitHub
parent fa3feba672
commit aab72cb1cb
8 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -236,7 +236,7 @@ import {
isContextProvider as isLegacyContextProvider,
pushTopLevelContextObject,
invalidateContextProvider,
} from './ReactFiberContext';
} from './ReactFiberLegacyContext';
import {
getIsHydrating,
enterHydrationState,
+2 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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,