diff --git a/packages/react-art/src/ReactFiberConfigART.js b/packages/react-art/src/ReactARTHostConfig.js similarity index 95% rename from packages/react-art/src/ReactFiberConfigART.js rename to packages/react-art/src/ReactARTHostConfig.js index 591072cec84e8..97a6b421b9f0f 100644 --- a/packages/react-art/src/ReactFiberConfigART.js +++ b/packages/react-art/src/ReactARTHostConfig.js @@ -238,13 +238,13 @@ function applyTextProps(instance, props, prevProps = {}) { } } -export * from 'react-reconciler/src/ReactFiberConfigWithNoPersistence'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoHydration'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoScopes'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoTestSelectors'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoMicrotasks'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoResources'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoSingletons'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoPersistence'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoHydration'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoScopes'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoTestSelectors'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoMicrotasks'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoResources'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoSingletons'; export function appendInitialChild(parentInstance, child) { if (typeof child === 'string') { diff --git a/packages/react-dom-bindings/src/client/ReactDOMComponentTree.js b/packages/react-dom-bindings/src/client/ReactDOMComponentTree.js index 839f346c9d88f..3f8044ac9fb82 100644 --- a/packages/react-dom-bindings/src/client/ReactDOMComponentTree.js +++ b/packages/react-dom-bindings/src/client/ReactDOMComponentTree.js @@ -21,7 +21,7 @@ import type { Props, HoistableRoot, RootResources, -} from './ReactFiberConfigDOM'; +} from './ReactDOMHostConfig'; import { HostComponent, @@ -32,7 +32,7 @@ import { SuspenseComponent, } from 'react-reconciler/src/ReactWorkTags'; -import {getParentSuspenseInstance} from './ReactFiberConfigDOM'; +import {getParentSuspenseInstance} from './ReactDOMHostConfig'; import { enableScopeAPI, diff --git a/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js b/packages/react-dom-bindings/src/client/ReactDOMHostConfig.js similarity index 99% rename from packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js rename to packages/react-dom-bindings/src/client/ReactDOMHostConfig.js index 8dd5252609d54..48b1f41b85fc7 100644 --- a/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js +++ b/packages/react-dom-bindings/src/client/ReactDOMHostConfig.js @@ -179,7 +179,7 @@ const STYLE = 'style'; let eventsEnabled: ?boolean = null; let selectionInformation: null | SelectionInformation = null; -export * from 'react-reconciler/src/ReactFiberConfigWithNoPersistence'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoPersistence'; function getOwnerDocumentFromRootContainer( rootContainerElement: Element | Document | DocumentFragment, diff --git a/packages/react-dom-bindings/src/events/ReactDOMEventListener.js b/packages/react-dom-bindings/src/events/ReactDOMEventListener.js index 70cec7fa0e608..d10e8fccfbece 100644 --- a/packages/react-dom-bindings/src/events/ReactDOMEventListener.js +++ b/packages/react-dom-bindings/src/events/ReactDOMEventListener.js @@ -10,7 +10,7 @@ import type {EventPriority} from 'react-reconciler/src/ReactEventPriorities'; import type {AnyNativeEvent} from '../events/PluginModuleType'; import type {Fiber, FiberRoot} from 'react-reconciler/src/ReactInternalTypes'; -import type {Container, SuspenseInstance} from '../client/ReactFiberConfigDOM'; +import type {Container, SuspenseInstance} from '../client/ReactDOMHostConfig'; import type {DOMEventName} from '../events/DOMEventNames'; import { diff --git a/packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js b/packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js index 59fc3a8a61811..48c9884c42878 100644 --- a/packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js +++ b/packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js @@ -8,7 +8,7 @@ */ import type {AnyNativeEvent} from '../events/PluginModuleType'; -import type {Container, SuspenseInstance} from '../client/ReactFiberConfigDOM'; +import type {Container, SuspenseInstance} from '../client/ReactDOMHostConfig'; import type {DOMEventName} from '../events/DOMEventNames'; import type {EventSystemFlags} from './EventSystemFlags'; import type {FiberRoot} from 'react-reconciler/src/ReactInternalTypes'; diff --git a/packages/react-dom-bindings/src/events/getListener.js b/packages/react-dom-bindings/src/events/getListener.js index 68ab23e219475..2cdb8cfdfbee7 100644 --- a/packages/react-dom-bindings/src/events/getListener.js +++ b/packages/react-dom-bindings/src/events/getListener.js @@ -7,7 +7,7 @@ */ import type {Fiber} from 'react-reconciler/src/ReactInternalTypes'; -import type {Props} from '../client/ReactFiberConfigDOM'; +import type {Props} from '../client/ReactDOMHostConfig'; import {getFiberCurrentPropsFromNode} from '../client/ReactDOMComponentTree'; diff --git a/packages/react-dom-bindings/src/events/plugins/ChangeEventPlugin.js b/packages/react-dom-bindings/src/events/plugins/ChangeEventPlugin.js index ff478e4a6b5d5..fddc501013519 100644 --- a/packages/react-dom-bindings/src/events/plugins/ChangeEventPlugin.js +++ b/packages/react-dom-bindings/src/events/plugins/ChangeEventPlugin.js @@ -6,7 +6,7 @@ * * @flow */ -import type {TextInstance, Instance} from '../../client/ReactFiberConfigDOM'; +import type {TextInstance, Instance} from '../../client/ReactDOMHostConfig'; import type {AnyNativeEvent} from '../PluginModuleType'; import type {DOMEventName} from '../DOMEventNames'; import type {DispatchQueue} from '../DOMPluginEventSystem'; diff --git a/packages/react-dom-bindings/src/server/fizz-instruction-set/ReactDOMFizzInstructionSetShared.js b/packages/react-dom-bindings/src/server/fizz-instruction-set/ReactDOMFizzInstructionSetShared.js index 6058eddaad7eb..e439a87a96140 100644 --- a/packages/react-dom-bindings/src/server/fizz-instruction-set/ReactDOMFizzInstructionSetShared.js +++ b/packages/react-dom-bindings/src/server/fizz-instruction-set/ReactDOMFizzInstructionSetShared.js @@ -63,7 +63,7 @@ export function completeBoundary(suspenseBoundaryID, contentID, errorDigest) { if (!errorDigest) { // Clear all the existing children. This is complicated because // there can be embedded Suspense boundaries in the fallback. - // This is similar to clearSuspenseBoundary in ReactFiberConfigDOM. + // This is similar to clearSuspenseBoundary in ReactDOMHostConfig. // TODO: We could avoid this if we never emitted suspense boundaries in fallback trees. // They never hydrate anyway. However, currently we support incrementally loading the fallback. const parentInstance = suspenseNode.parentNode; diff --git a/packages/react-dom/src/client/ReactDOM.js b/packages/react-dom/src/client/ReactDOM.js index d6ef4261246de..ef5d3234190ec 100644 --- a/packages/react-dom/src/client/ReactDOM.js +++ b/packages/react-dom/src/client/ReactDOM.js @@ -11,7 +11,7 @@ import type {ReactNodeList} from 'shared/ReactTypes'; import type { Container, PublicInstance, -} from 'react-dom-bindings/src/client/ReactFiberConfigDOM'; +} from 'react-dom-bindings/src/client/ReactDOMHostConfig'; import type { RootType, HydrateRootOptions, diff --git a/packages/react-dom/src/client/ReactDOMLegacy.js b/packages/react-dom/src/client/ReactDOMLegacy.js index b8b1fc43239a9..1973e97ada52a 100644 --- a/packages/react-dom/src/client/ReactDOMLegacy.js +++ b/packages/react-dom/src/client/ReactDOMLegacy.js @@ -10,11 +10,11 @@ import type { Container, PublicInstance, -} from 'react-dom-bindings/src/client/ReactFiberConfigDOM'; +} from 'react-dom-bindings/src/client/ReactDOMHostConfig'; import type {FiberRoot} from 'react-reconciler/src/ReactInternalTypes'; import type {ReactNodeList} from 'shared/ReactTypes'; -import {clearContainer} from 'react-dom-bindings/src/client/ReactFiberConfigDOM'; +import {clearContainer} from 'react-dom-bindings/src/client/ReactDOMHostConfig'; import { getInstanceFromNode, isContainerMarkedAsRoot, diff --git a/packages/react-dom/src/client/ReactDOMRoot.js b/packages/react-dom/src/client/ReactDOMRoot.js index b0f53ccdf06f8..96d32f8622204 100644 --- a/packages/react-dom/src/client/ReactDOMRoot.js +++ b/packages/react-dom/src/client/ReactDOMRoot.js @@ -15,7 +15,7 @@ import type { import ReactDOMSharedInternals from '../ReactDOMSharedInternals'; const {Dispatcher} = ReactDOMSharedInternals; -import {ReactDOMClientDispatcher} from 'react-dom-bindings/src/client/ReactFiberConfigDOM'; +import {ReactDOMClientDispatcher} from 'react-dom-bindings/src/client/ReactDOMHostConfig'; import {queueExplicitHydrationTarget} from 'react-dom-bindings/src/events/ReactDOMEventReplaying'; import {REACT_ELEMENT_TYPE} from 'shared/ReactSymbols'; import { diff --git a/packages/react-native-renderer/src/ReactFabric.js b/packages/react-native-renderer/src/ReactFabric.js index 36be493520a2d..d918779140dd7 100644 --- a/packages/react-native-renderer/src/ReactFabric.js +++ b/packages/react-native-renderer/src/ReactFabric.js @@ -40,7 +40,7 @@ import { sendAccessibilityEvent, getNodeFromInternalInstanceHandle, } from './ReactNativePublicCompat'; -import {getPublicInstanceFromInternalInstanceHandle} from './ReactFiberConfigFabric'; +import {getPublicInstanceFromInternalInstanceHandle} from './ReactFabricHostConfig'; // $FlowFixMe[missing-local-annot] function onRecoverableError(error) { diff --git a/packages/react-native-renderer/src/ReactFabricComponentTree.js b/packages/react-native-renderer/src/ReactFabricComponentTree.js index f36e742a45aba..c295c42ed102b 100644 --- a/packages/react-native-renderer/src/ReactFabricComponentTree.js +++ b/packages/react-native-renderer/src/ReactFabricComponentTree.js @@ -12,9 +12,9 @@ import type { Instance, Props, TextInstance, -} from './ReactFiberConfigFabric'; +} from './ReactFabricHostConfig'; import type {Fiber} from 'react-reconciler/src/ReactInternalTypes'; -import {getPublicInstance} from './ReactFiberConfigFabric'; +import {getPublicInstance} from './ReactFabricHostConfig'; // `node` is typed incorrectly here. The proper type should be `PublicInstance`. // This is ok in DOM because they types are interchangeable, but in React Native diff --git a/packages/react-native-renderer/src/ReactFabricEventEmitter.js b/packages/react-native-renderer/src/ReactFabricEventEmitter.js index a0b8eb98b4867..b7d545aa114f8 100644 --- a/packages/react-native-renderer/src/ReactFabricEventEmitter.js +++ b/packages/react-native-renderer/src/ReactFabricEventEmitter.js @@ -29,7 +29,7 @@ import getListener from './ReactNativeGetListener'; import {runEventsInBatch} from './legacy-events/EventBatching'; import {RawEventEmitter} from 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface'; -import {getPublicInstance} from './ReactFiberConfigFabric'; +import {getPublicInstance} from './ReactFabricHostConfig'; export {getListener, registrationNameModules as registrationNames}; diff --git a/packages/react-native-renderer/src/ReactFiberConfigFabric.js b/packages/react-native-renderer/src/ReactFabricHostConfig.js similarity index 96% rename from packages/react-native-renderer/src/ReactFiberConfigFabric.js rename to packages/react-native-renderer/src/ReactFabricHostConfig.js index 03ab9b6febe39..72109ca7c3ec1 100644 --- a/packages/react-native-renderer/src/ReactFiberConfigFabric.js +++ b/packages/react-native-renderer/src/ReactFabricHostConfig.js @@ -108,13 +108,13 @@ if (registerEventHandler) { registerEventHandler(dispatchEvent); } -export * from 'react-reconciler/src/ReactFiberConfigWithNoMutation'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoHydration'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoScopes'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoTestSelectors'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoMicrotasks'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoResources'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoSingletons'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoMutation'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoHydration'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoScopes'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoTestSelectors'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoMicrotasks'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoResources'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoSingletons'; export function appendInitialChild( parentInstance: Instance, diff --git a/packages/react-native-renderer/src/ReactNativeFiberHostComponent.js b/packages/react-native-renderer/src/ReactNativeFiberHostComponent.js index 8294e0e6f07cd..3db5948c4eb0d 100644 --- a/packages/react-native-renderer/src/ReactNativeFiberHostComponent.js +++ b/packages/react-native-renderer/src/ReactNativeFiberHostComponent.js @@ -16,7 +16,7 @@ import type { INativeMethods, ViewConfig, } from './ReactNativeTypes'; -import type {Instance} from './ReactFiberConfigNative'; +import type {Instance} from './ReactNativeHostConfig'; // Modules provided by RN: import { diff --git a/packages/react-native-renderer/src/ReactFiberConfigNative.js b/packages/react-native-renderer/src/ReactNativeHostConfig.js similarity index 96% rename from packages/react-native-renderer/src/ReactFiberConfigNative.js rename to packages/react-native-renderer/src/ReactNativeHostConfig.js index b218a1f77c234..aeed0c01c069c 100644 --- a/packages/react-native-renderer/src/ReactFiberConfigNative.js +++ b/packages/react-native-renderer/src/ReactNativeHostConfig.js @@ -84,13 +84,13 @@ function recursivelyUncacheFiberNode(node: Instance | TextInstance) { } } -export * from 'react-reconciler/src/ReactFiberConfigWithNoPersistence'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoHydration'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoScopes'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoTestSelectors'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoMicrotasks'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoResources'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoSingletons'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoPersistence'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoHydration'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoScopes'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoTestSelectors'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoMicrotasks'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoResources'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoSingletons'; export function appendInitialChild( parentInstance: Instance, diff --git a/packages/react-reconciler/README.md b/packages/react-reconciler/README.md index 546e44258378f..2aeb36fbd6caf 100644 --- a/packages/react-reconciler/README.md +++ b/packages/react-reconciler/README.md @@ -51,15 +51,15 @@ const HostConfig = { * **[Building a simple custom renderer to DOM](https://medium.com/@agent_hunt/hello-world-custom-react-renderer-9a95b7cd04bc)** * **[Building a simple custom renderer to native](https://medium.com/@agent_hunt/introduction-to-react-native-renderers-aka-react-native-is-the-java-and-react-native-renderers-are-828a0022f433)** -The full list of supported methods [can be found here](https://github.com/facebook/react/blob/main/packages/react-reconciler/src/forks/ReactFiberConfig.custom.js). For their signatures, we recommend looking at specific examples below. +The full list of supported methods [can be found here](https://github.com/facebook/react/blob/main/packages/react-reconciler/src/forks/ReactFiberHostConfig.custom.js). For their signatures, we recommend looking at specific examples below. The React repository includes several renderers. Each of them has its own host config. The examples in the React repository are declared a bit differently than a third-party renderer would be. In particular, the `HostConfig` object mentioned above is never explicitly declared, and instead is a *module* in our code. However, its exports correspond directly to properties on a `HostConfig` object you'd need to declare in your code: -* [React ART](https://github.com/facebook/react/blob/main/packages/react-art/src/ReactART.js) and its [host config](https://github.com/facebook/react/blob/main/packages/react-art/src/ReactFiberConfigART.js) -* [React DOM](https://github.com/facebook/react/blob/main/packages/react-dom/src/client/ReactDOM.js) and its [host config](https://github.com/facebook/react/blob/main/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js) -* [React Native](https://github.com/facebook/react/blob/main/packages/react-native-renderer/src/ReactNativeRenderer.js) and its [host config](https://github.com/facebook/react/blob/main/packages/react-native-renderer/src/ReactFiberConfigNative.js) +* [React ART](https://github.com/facebook/react/blob/main/packages/react-art/src/ReactART.js) and its [host config](https://github.com/facebook/react/blob/main/packages/react-art/src/ReactARTHostConfig.js) +* [React DOM](https://github.com/facebook/react/blob/main/packages/react-dom/src/client/ReactDOM.js) and its [host config](https://github.com/facebook/react/blob/main/packages/react-dom-bindings/src/client/ReactDOMHostConfig.js) +* [React Native](https://github.com/facebook/react/blob/main/packages/react-native-renderer/src/ReactNativeRenderer.js) and its [host config](https://github.com/facebook/react/blob/main/packages/react-native-renderer/src/ReactNativeHostConfig.js) If these links break please file an issue and we’ll fix them. They intentionally link to the latest versions since the API is still evolving. If you have more questions please file an issue and we’ll try to help! @@ -240,7 +240,7 @@ The constant you return depends on which event, if any, is being handled right n * **Other events / No active event:** In all other cases, return `DefaultEventPriority`. This tells React that this event is considered background work, and interactive events will be prioritized over it. -You can consult the `getCurrentEventPriority()` implementation in `ReactFiberConfigDOM.js` for a reference implementation. +You can consult the `getCurrentEventPriority()` implementation in `ReactDOMHostConfig.js` for a reference implementation. ### Mutation Methods @@ -328,10 +328,10 @@ This method should mutate the `container` root node and remove all children from ### Persistence Methods -If you use the persistent mode instead of the mutation mode, you would still need the "Core Methods". However, instead of the Mutation Methods above you will implement a different set of methods that performs cloning nodes and replacing them at the root level. You can find a list of them in the "Persistence" section [listed in this file](https://github.com/facebook/react/blob/main/packages/react-reconciler/src/forks/ReactFiberConfig.custom.js). File an issue if you need help. +If you use the persistent mode instead of the mutation mode, you would still need the "Core Methods". However, instead of the Mutation Methods above you will implement a different set of methods that performs cloning nodes and replacing them at the root level. You can find a list of them in the "Persistence" section [listed in this file](https://github.com/facebook/react/blob/main/packages/react-reconciler/src/forks/ReactFiberHostConfig.custom.js). File an issue if you need help. ### Hydration Methods You can optionally implement hydration to "attach" to the existing tree during the initial render instead of creating it from scratch. For example, the DOM renderer uses this to attach to an HTML markup. -To support hydration, you need to declare `supportsHydration: true` and then implement the methods in the "Hydration" section [listed in this file](https://github.com/facebook/react/blob/main/packages/react-reconciler/src/forks/ReactFiberConfig.custom.js). File an issue if you need help. +To support hydration, you need to declare `supportsHydration: true` and then implement the methods in the "Hydration" section [listed in this file](https://github.com/facebook/react/blob/main/packages/react-reconciler/src/forks/ReactFiberHostConfig.custom.js). File an issue if you need help. diff --git a/packages/react-reconciler/src/ReactFiber.js b/packages/react-reconciler/src/ReactFiber.js index 7eefefa1c4d14..e362e984ce16d 100644 --- a/packages/react-reconciler/src/ReactFiber.js +++ b/packages/react-reconciler/src/ReactFiber.js @@ -14,7 +14,7 @@ import type {RootTag} from './ReactRootTags'; import type {WorkTag} from './ReactWorkTags'; import type {TypeOfMode} from './ReactTypeOfMode'; import type {Lanes} from './ReactFiberLane'; -import type {SuspenseInstance} from './ReactFiberConfig'; +import type {SuspenseInstance} from './ReactFiberHostConfig'; import type { OffscreenProps, OffscreenInstance, @@ -26,7 +26,7 @@ import { supportsSingletons, isHostHoistableType, isHostSingletonType, -} from './ReactFiberConfig'; +} from './ReactFiberHostConfig'; import { createRootStrictEffectsByDefault, enableCache, diff --git a/packages/react-reconciler/src/ReactFiberAct.js b/packages/react-reconciler/src/ReactFiberAct.js index 117a7fc05196b..57848f03a1e6a 100644 --- a/packages/react-reconciler/src/ReactFiberAct.js +++ b/packages/react-reconciler/src/ReactFiberAct.js @@ -11,7 +11,7 @@ import type {Fiber} from './ReactFiber'; import ReactSharedInternals from 'shared/ReactSharedInternals'; -import {warnsIfNotActing} from './ReactFiberConfig'; +import {warnsIfNotActing} from './ReactFiberHostConfig'; const {ReactCurrentActQueue} = ReactSharedInternals; diff --git a/packages/react-reconciler/src/ReactFiberBeginWork.js b/packages/react-reconciler/src/ReactFiberBeginWork.js index 7b5b2f72b1e0c..5a53ea848b62c 100644 --- a/packages/react-reconciler/src/ReactFiberBeginWork.js +++ b/packages/react-reconciler/src/ReactFiberBeginWork.js @@ -168,8 +168,8 @@ import { isPrimaryRenderer, getResource, createHoistableInstance, -} from './ReactFiberConfig'; -import type {SuspenseInstance} from './ReactFiberConfig'; +} from './ReactFiberHostConfig'; +import type {SuspenseInstance} from './ReactFiberHostConfig'; import {shouldError, shouldSuspend} from './ReactFiberReconciler'; import { pushHostContext, diff --git a/packages/react-reconciler/src/ReactFiberCommitWork.js b/packages/react-reconciler/src/ReactFiberCommitWork.js index 3aca03988f6cd..4234732bc7a72 100644 --- a/packages/react-reconciler/src/ReactFiberCommitWork.js +++ b/packages/react-reconciler/src/ReactFiberCommitWork.js @@ -15,7 +15,7 @@ import type { ChildSet, UpdatePayload, HoistableRoot, -} from './ReactFiberConfig'; +} from './ReactFiberHostConfig'; import type {Fiber, FiberRoot} from './ReactInternalTypes'; import type {Lanes} from './ReactFiberLane'; import {NoTimestamp, SyncLane} from './ReactFiberLane'; @@ -162,7 +162,7 @@ import { prepareToCommitHoistables, suspendInstance, suspendResource, -} from './ReactFiberConfig'; +} from './ReactFiberHostConfig'; import { captureCommitPhaseError, resolveRetryWakeable, diff --git a/packages/react-reconciler/src/ReactFiberCompleteWork.js b/packages/react-reconciler/src/ReactFiberCompleteWork.js index ba5f92944e029..a057cc29b6e7b 100644 --- a/packages/react-reconciler/src/ReactFiberCompleteWork.js +++ b/packages/react-reconciler/src/ReactFiberCompleteWork.js @@ -18,7 +18,7 @@ import type { Container, ChildSet, Resource, -} from './ReactFiberConfig'; +} from './ReactFiberHostConfig'; import type { SuspenseState, SuspenseListRenderState, @@ -115,7 +115,7 @@ import { mayResourceSuspendCommit, preloadInstance, preloadResource, -} from './ReactFiberConfig'; +} from './ReactFiberHostConfig'; import { getRootHostContainer, popHostContext, diff --git a/packages/react-reconciler/src/ReactFiberConfig.js b/packages/react-reconciler/src/ReactFiberHostConfig.js similarity index 100% rename from packages/react-reconciler/src/ReactFiberConfig.js rename to packages/react-reconciler/src/ReactFiberHostConfig.js diff --git a/packages/react-reconciler/src/ReactFiberConfigWithNoHydration.js b/packages/react-reconciler/src/ReactFiberHostConfigWithNoHydration.js similarity index 100% rename from packages/react-reconciler/src/ReactFiberConfigWithNoHydration.js rename to packages/react-reconciler/src/ReactFiberHostConfigWithNoHydration.js diff --git a/packages/react-reconciler/src/ReactFiberConfigWithNoMicrotasks.js b/packages/react-reconciler/src/ReactFiberHostConfigWithNoMicrotasks.js similarity index 100% rename from packages/react-reconciler/src/ReactFiberConfigWithNoMicrotasks.js rename to packages/react-reconciler/src/ReactFiberHostConfigWithNoMicrotasks.js diff --git a/packages/react-reconciler/src/ReactFiberConfigWithNoMutation.js b/packages/react-reconciler/src/ReactFiberHostConfigWithNoMutation.js similarity index 100% rename from packages/react-reconciler/src/ReactFiberConfigWithNoMutation.js rename to packages/react-reconciler/src/ReactFiberHostConfigWithNoMutation.js diff --git a/packages/react-reconciler/src/ReactFiberConfigWithNoPersistence.js b/packages/react-reconciler/src/ReactFiberHostConfigWithNoPersistence.js similarity index 100% rename from packages/react-reconciler/src/ReactFiberConfigWithNoPersistence.js rename to packages/react-reconciler/src/ReactFiberHostConfigWithNoPersistence.js diff --git a/packages/react-reconciler/src/ReactFiberConfigWithNoResources.js b/packages/react-reconciler/src/ReactFiberHostConfigWithNoResources.js similarity index 100% rename from packages/react-reconciler/src/ReactFiberConfigWithNoResources.js rename to packages/react-reconciler/src/ReactFiberHostConfigWithNoResources.js diff --git a/packages/react-reconciler/src/ReactFiberConfigWithNoScopes.js b/packages/react-reconciler/src/ReactFiberHostConfigWithNoScopes.js similarity index 100% rename from packages/react-reconciler/src/ReactFiberConfigWithNoScopes.js rename to packages/react-reconciler/src/ReactFiberHostConfigWithNoScopes.js diff --git a/packages/react-reconciler/src/ReactFiberConfigWithNoSingletons.js b/packages/react-reconciler/src/ReactFiberHostConfigWithNoSingletons.js similarity index 100% rename from packages/react-reconciler/src/ReactFiberConfigWithNoSingletons.js rename to packages/react-reconciler/src/ReactFiberHostConfigWithNoSingletons.js diff --git a/packages/react-reconciler/src/ReactFiberConfigWithNoTestSelectors.js b/packages/react-reconciler/src/ReactFiberHostConfigWithNoTestSelectors.js similarity index 100% rename from packages/react-reconciler/src/ReactFiberConfigWithNoTestSelectors.js rename to packages/react-reconciler/src/ReactFiberHostConfigWithNoTestSelectors.js diff --git a/packages/react-reconciler/src/ReactFiberHostContext.js b/packages/react-reconciler/src/ReactFiberHostContext.js index c5733b24543d2..539dedbbd1c8b 100644 --- a/packages/react-reconciler/src/ReactFiberHostContext.js +++ b/packages/react-reconciler/src/ReactFiberHostContext.js @@ -9,9 +9,9 @@ import type {Fiber} from './ReactInternalTypes'; import type {StackCursor} from './ReactFiberStack'; -import type {Container, HostContext} from './ReactFiberConfig'; +import type {Container, HostContext} from './ReactFiberHostConfig'; -import {getChildHostContext, getRootHostContext} from './ReactFiberConfig'; +import {getChildHostContext, getRootHostContext} from './ReactFiberHostConfig'; import {createCursor, push, pop} from './ReactFiberStack'; const contextStackCursor: StackCursor = createCursor(null); diff --git a/packages/react-reconciler/src/ReactFiberHotReloading.js b/packages/react-reconciler/src/ReactFiberHotReloading.js index ffb3ae8a0ee1b..e4b1561896c31 100644 --- a/packages/react-reconciler/src/ReactFiberHotReloading.js +++ b/packages/react-reconciler/src/ReactFiberHotReloading.js @@ -11,7 +11,7 @@ import type {ReactElement} from 'shared/ReactElementType'; import type {Fiber, FiberRoot} from './ReactInternalTypes'; -import type {Instance} from './ReactFiberConfig'; +import type {Instance} from './ReactFiberHostConfig'; import type {ReactNodeList} from 'shared/ReactTypes'; import {enableHostSingletons, enableFloat} from 'shared/ReactFeatureFlags'; @@ -41,7 +41,7 @@ import { REACT_MEMO_TYPE, REACT_LAZY_TYPE, } from 'shared/ReactSymbols'; -import {supportsSingletons} from './ReactFiberConfig'; +import {supportsSingletons} from './ReactFiberHostConfig'; export type Family = { current: any, diff --git a/packages/react-reconciler/src/ReactFiberHydrationContext.js b/packages/react-reconciler/src/ReactFiberHydrationContext.js index a7b0cfdbf2b64..351fa122929c7 100644 --- a/packages/react-reconciler/src/ReactFiberHydrationContext.js +++ b/packages/react-reconciler/src/ReactFiberHydrationContext.js @@ -16,7 +16,7 @@ import type { SuspenseInstance, Container, HostContext, -} from './ReactFiberConfig'; +} from './ReactFiberHostConfig'; import type {SuspenseState} from './ReactFiberSuspenseComponent'; import type {TreeContext} from './ReactFiberTreeContext'; import type {CapturedValue} from './ReactCapturedValue'; @@ -81,7 +81,7 @@ import { canHydrateSuspenseInstance, isHydratableType, isHydratableText, -} from './ReactFiberConfig'; +} from './ReactFiberHostConfig'; import {OffscreenLane} from './ReactFiberLane'; import { getSuspendedTreeContext, diff --git a/packages/react-reconciler/src/ReactFiberNewContext.js b/packages/react-reconciler/src/ReactFiberNewContext.js index 003022a9c6265..9987d8fd6ad3a 100644 --- a/packages/react-reconciler/src/ReactFiberNewContext.js +++ b/packages/react-reconciler/src/ReactFiberNewContext.js @@ -17,7 +17,7 @@ import type {StackCursor} from './ReactFiberStack'; import type {Lanes} from './ReactFiberLane'; import type {SharedQueue} from './ReactFiberClassUpdateQueue'; -import {isPrimaryRenderer} from './ReactFiberConfig'; +import {isPrimaryRenderer} from './ReactFiberHostConfig'; import {createCursor, push, pop} from './ReactFiberStack'; import { ContextProvider, diff --git a/packages/react-reconciler/src/ReactFiberReconciler.js b/packages/react-reconciler/src/ReactFiberReconciler.js index 5ac1ecaa4ea74..2b69b09edbff4 100644 --- a/packages/react-reconciler/src/ReactFiberReconciler.js +++ b/packages/react-reconciler/src/ReactFiberReconciler.js @@ -20,7 +20,7 @@ import type { Container, PublicInstance, RendererInspectionConfig, -} from './ReactFiberConfig'; +} from './ReactFiberHostConfig'; import type {ReactNodeList} from 'shared/ReactTypes'; import type {Lane} from './ReactFiberLane'; import type {SuspenseState} from './ReactFiberSuspenseComponent'; @@ -41,7 +41,7 @@ import getComponentNameFromFiber from 'react-reconciler/src/getComponentNameFrom import isArray from 'shared/isArray'; import {enableSchedulingProfiler} from 'shared/ReactFeatureFlags'; import ReactSharedInternals from 'shared/ReactSharedInternals'; -import {getPublicInstance} from './ReactFiberConfig'; +import {getPublicInstance} from './ReactFiberHostConfig'; import { findCurrentUnmaskedContext, processChildContext, diff --git a/packages/react-reconciler/src/ReactFiberRoot.js b/packages/react-reconciler/src/ReactFiberRoot.js index 35daaf7c10dc4..2733d0ccf3515 100644 --- a/packages/react-reconciler/src/ReactFiberRoot.js +++ b/packages/react-reconciler/src/ReactFiberRoot.js @@ -15,9 +15,9 @@ import type { } from './ReactInternalTypes'; import type {RootTag} from './ReactRootTags'; import type {Cache} from './ReactFiberCacheComponent'; -import type {Container} from './ReactFiberConfig'; +import type {Container} from './ReactFiberHostConfig'; -import {noTimeout, supportsHydration} from './ReactFiberConfig'; +import {noTimeout, supportsHydration} from './ReactFiberHostConfig'; import {createHostRootFiber} from './ReactFiber'; import { NoLane, diff --git a/packages/react-reconciler/src/ReactFiberRootScheduler.js b/packages/react-reconciler/src/ReactFiberRootScheduler.js index 7206579745871..db60ab8be5360 100644 --- a/packages/react-reconciler/src/ReactFiberRootScheduler.js +++ b/packages/react-reconciler/src/ReactFiberRootScheduler.js @@ -49,7 +49,7 @@ import { IdleEventPriority, lanesToEventPriority, } from './ReactEventPriorities'; -import {supportsMicrotasks, scheduleMicrotask} from './ReactFiberConfig'; +import {supportsMicrotasks, scheduleMicrotask} from './ReactFiberHostConfig'; import ReactSharedInternals from 'shared/ReactSharedInternals'; const {ReactCurrentActQueue} = ReactSharedInternals; diff --git a/packages/react-reconciler/src/ReactFiberScope.js b/packages/react-reconciler/src/ReactFiberScope.js index a95518aacb31c..c663f4a1c537f 100644 --- a/packages/react-reconciler/src/ReactFiberScope.js +++ b/packages/react-reconciler/src/ReactFiberScope.js @@ -18,7 +18,7 @@ import { getPublicInstance, getInstanceFromNode, getInstanceFromScope, -} from './ReactFiberConfig'; +} from './ReactFiberHostConfig'; import {isFiberSuspenseAndTimedOut} from './ReactFiberTreeReflection'; import {HostComponent, ScopeComponent, ContextProvider} from './ReactWorkTags'; diff --git a/packages/react-reconciler/src/ReactFiberSuspenseComponent.js b/packages/react-reconciler/src/ReactFiberSuspenseComponent.js index 1f558a44903e2..e248ad0719bd7 100644 --- a/packages/react-reconciler/src/ReactFiberSuspenseComponent.js +++ b/packages/react-reconciler/src/ReactFiberSuspenseComponent.js @@ -9,7 +9,7 @@ import type {ReactNodeList, Wakeable} from 'shared/ReactTypes'; import type {Fiber} from './ReactInternalTypes'; -import type {SuspenseInstance} from './ReactFiberConfig'; +import type {SuspenseInstance} from './ReactFiberHostConfig'; import type {Lane} from './ReactFiberLane'; import type {TreeContext} from './ReactFiberTreeContext'; @@ -18,7 +18,7 @@ import {NoFlags, DidCapture} from './ReactFiberFlags'; import { isSuspenseInstancePending, isSuspenseInstanceFallback, -} from './ReactFiberConfig'; +} from './ReactFiberHostConfig'; export type SuspenseProps = { children?: ReactNodeList, diff --git a/packages/react-reconciler/src/ReactFiberTransition.js b/packages/react-reconciler/src/ReactFiberTransition.js index a148375a6708e..05cb89991ed7e 100644 --- a/packages/react-reconciler/src/ReactFiberTransition.js +++ b/packages/react-reconciler/src/ReactFiberTransition.js @@ -13,7 +13,7 @@ import type {Cache, SpawnedCachePool} from './ReactFiberCacheComponent'; import type {Transition} from './ReactFiberTracingMarkerComponent'; import {enableCache, enableTransitionTracing} from 'shared/ReactFeatureFlags'; -import {isPrimaryRenderer} from './ReactFiberConfig'; +import {isPrimaryRenderer} from './ReactFiberHostConfig'; import {createCursor, push, pop} from './ReactFiberStack'; import { getWorkInProgressRoot, diff --git a/packages/react-reconciler/src/ReactFiberTreeReflection.js b/packages/react-reconciler/src/ReactFiberTreeReflection.js index 8828017eee8d3..6be4e0b2c0807 100644 --- a/packages/react-reconciler/src/ReactFiberTreeReflection.js +++ b/packages/react-reconciler/src/ReactFiberTreeReflection.js @@ -8,7 +8,7 @@ */ import type {Fiber} from './ReactInternalTypes'; -import type {Container, SuspenseInstance} from './ReactFiberConfig'; +import type {Container, SuspenseInstance} from './ReactFiberHostConfig'; import type {SuspenseState} from './ReactFiberSuspenseComponent'; import {get as getInstance} from 'shared/ReactInstanceMap'; diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js index 94af7e44d59e1..401defb280fe4 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js @@ -77,7 +77,7 @@ import { startSuspendingCommit, waitForCommitToBeReady, preloadInstance, -} from './ReactFiberConfig'; +} from './ReactFiberHostConfig'; import { createWorkInProgress, diff --git a/packages/react-reconciler/src/ReactInternalTypes.js b/packages/react-reconciler/src/ReactInternalTypes.js index c7264083172f0..ae1e75bfe9467 100644 --- a/packages/react-reconciler/src/ReactInternalTypes.js +++ b/packages/react-reconciler/src/ReactInternalTypes.js @@ -29,7 +29,7 @@ import type { TimeoutHandle, NoTimeout, SuspenseInstance, -} from './ReactFiberConfig'; +} from './ReactFiberHostConfig'; import type {Cache} from './ReactFiberCacheComponent'; import type { TracingMarkerInstance, diff --git a/packages/react-reconciler/src/ReactMutableSource.js b/packages/react-reconciler/src/ReactMutableSource.js index b5f1bd197b786..218e2171a9c15 100644 --- a/packages/react-reconciler/src/ReactMutableSource.js +++ b/packages/react-reconciler/src/ReactMutableSource.js @@ -10,7 +10,7 @@ import type {MutableSource, MutableSourceVersion} from 'shared/ReactTypes'; import type {FiberRoot} from './ReactInternalTypes'; -import {isPrimaryRenderer} from './ReactFiberConfig'; +import {isPrimaryRenderer} from './ReactFiberHostConfig'; // Work in progress version numbers only apply to a single render, // and should be reset before starting a new render. diff --git a/packages/react-reconciler/src/ReactPostPaintCallback.js b/packages/react-reconciler/src/ReactPostPaintCallback.js index 76c56e90c3f08..419f4514e30f3 100644 --- a/packages/react-reconciler/src/ReactPostPaintCallback.js +++ b/packages/react-reconciler/src/ReactPostPaintCallback.js @@ -6,7 +6,7 @@ * * @flow */ -import {requestPostPaintCallback} from './ReactFiberConfig'; +import {requestPostPaintCallback} from './ReactFiberHostConfig'; let postPaintCallbackScheduled = false; let callbacks: Array void)> = []; diff --git a/packages/react-reconciler/src/ReactTestSelectors.js b/packages/react-reconciler/src/ReactTestSelectors.js index 34f0529f8cdeb..0e83c65eb1dbc 100644 --- a/packages/react-reconciler/src/ReactTestSelectors.js +++ b/packages/react-reconciler/src/ReactTestSelectors.js @@ -8,7 +8,7 @@ */ import type {Fiber} from 'react-reconciler/src/ReactInternalTypes'; -import type {Instance} from './ReactFiberConfig'; +import type {Instance} from './ReactFiberHostConfig'; import { HostComponent, @@ -27,7 +27,7 @@ import { setFocusIfFocusable, setupIntersectionObserver, supportsTestSelectors, -} from './ReactFiberConfig'; +} from './ReactFiberHostConfig'; let COMPONENT_TYPE: symbol | number = 0b000; let HAS_PSEUDO_CLASS_TYPE: symbol | number = 0b001; diff --git a/packages/react-reconciler/src/forks/ReactFiberConfig.dom-browser.js b/packages/react-reconciler/src/forks/ReactFiberConfig.dom-browser.js deleted file mode 100644 index 4932b1a787bb9..0000000000000 --- a/packages/react-reconciler/src/forks/ReactFiberConfig.dom-browser.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -export * from 'react-dom-bindings/src/client/ReactFiberConfigDOM'; diff --git a/packages/react-reconciler/src/forks/ReactFiberConfig.dom-bun.js b/packages/react-reconciler/src/forks/ReactFiberConfig.dom-bun.js deleted file mode 100644 index 4932b1a787bb9..0000000000000 --- a/packages/react-reconciler/src/forks/ReactFiberConfig.dom-bun.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -export * from 'react-dom-bindings/src/client/ReactFiberConfigDOM'; diff --git a/packages/react-reconciler/src/forks/ReactFiberConfig.dom-edge-webpack.js b/packages/react-reconciler/src/forks/ReactFiberConfig.dom-edge-webpack.js deleted file mode 100644 index 4932b1a787bb9..0000000000000 --- a/packages/react-reconciler/src/forks/ReactFiberConfig.dom-edge-webpack.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -export * from 'react-dom-bindings/src/client/ReactFiberConfigDOM'; diff --git a/packages/react-reconciler/src/forks/ReactFiberConfig.dom-legacy.js b/packages/react-reconciler/src/forks/ReactFiberConfig.dom-legacy.js deleted file mode 100644 index 4932b1a787bb9..0000000000000 --- a/packages/react-reconciler/src/forks/ReactFiberConfig.dom-legacy.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -export * from 'react-dom-bindings/src/client/ReactFiberConfigDOM'; diff --git a/packages/react-reconciler/src/forks/ReactFiberConfig.dom-node-webpack.js b/packages/react-reconciler/src/forks/ReactFiberConfig.dom-node-webpack.js deleted file mode 100644 index 4932b1a787bb9..0000000000000 --- a/packages/react-reconciler/src/forks/ReactFiberConfig.dom-node-webpack.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -export * from 'react-dom-bindings/src/client/ReactFiberConfigDOM'; diff --git a/packages/react-reconciler/src/forks/ReactFiberConfig.dom-node.js b/packages/react-reconciler/src/forks/ReactFiberConfig.dom-node.js deleted file mode 100644 index 4932b1a787bb9..0000000000000 --- a/packages/react-reconciler/src/forks/ReactFiberConfig.dom-node.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -export * from 'react-dom-bindings/src/client/ReactFiberConfigDOM'; diff --git a/packages/react-reconciler/src/forks/ReactFiberConfig.dom-relay.js b/packages/react-reconciler/src/forks/ReactFiberConfig.dom-relay.js deleted file mode 100644 index 4932b1a787bb9..0000000000000 --- a/packages/react-reconciler/src/forks/ReactFiberConfig.dom-relay.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -export * from 'react-dom-bindings/src/client/ReactFiberConfigDOM'; diff --git a/packages/react-reconciler/src/forks/ReactFiberConfig.art.js b/packages/react-reconciler/src/forks/ReactFiberHostConfig.art.js similarity index 80% rename from packages/react-reconciler/src/forks/ReactFiberConfig.art.js rename to packages/react-reconciler/src/forks/ReactFiberHostConfig.art.js index 867ca996ec5af..da28b3729db7f 100644 --- a/packages/react-reconciler/src/forks/ReactFiberConfig.art.js +++ b/packages/react-reconciler/src/forks/ReactFiberHostConfig.art.js @@ -7,4 +7,4 @@ * @flow */ -export * from 'react-art/src/ReactFiberConfigART'; +export * from 'react-art/src/ReactARTHostConfig'; diff --git a/packages/react-reconciler/src/forks/ReactFiberConfig.custom.js b/packages/react-reconciler/src/forks/ReactFiberHostConfig.custom.js similarity index 100% rename from packages/react-reconciler/src/forks/ReactFiberConfig.custom.js rename to packages/react-reconciler/src/forks/ReactFiberHostConfig.custom.js diff --git a/packages/react-reconciler/src/forks/ReactFiberConfig.test.js b/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-browser.js similarity index 76% rename from packages/react-reconciler/src/forks/ReactFiberConfig.test.js rename to packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-browser.js index 85020417c2c7d..aae45be9aae50 100644 --- a/packages/react-reconciler/src/forks/ReactFiberConfig.test.js +++ b/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-browser.js @@ -7,4 +7,4 @@ * @flow */ -export * from 'react-test-renderer/src/ReactFiberConfigTestHost'; +export * from 'react-dom-bindings/src/client/ReactDOMHostConfig'; diff --git a/packages/react-reconciler/src/forks/ReactFiberConfig.fabric.js b/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-bun.js similarity index 76% rename from packages/react-reconciler/src/forks/ReactFiberConfig.fabric.js rename to packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-bun.js index f1787a68e845b..aae45be9aae50 100644 --- a/packages/react-reconciler/src/forks/ReactFiberConfig.fabric.js +++ b/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-bun.js @@ -7,4 +7,4 @@ * @flow */ -export * from 'react-native-renderer/src/ReactFiberConfigFabric'; +export * from 'react-dom-bindings/src/client/ReactDOMHostConfig'; diff --git a/packages/react-reconciler/src/forks/ReactFiberConfig.native-relay.js b/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-edge-webpack.js similarity index 76% rename from packages/react-reconciler/src/forks/ReactFiberConfig.native-relay.js rename to packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-edge-webpack.js index f1787a68e845b..aae45be9aae50 100644 --- a/packages/react-reconciler/src/forks/ReactFiberConfig.native-relay.js +++ b/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-edge-webpack.js @@ -7,4 +7,4 @@ * @flow */ -export * from 'react-native-renderer/src/ReactFiberConfigFabric'; +export * from 'react-dom-bindings/src/client/ReactDOMHostConfig'; diff --git a/packages/react-reconciler/src/forks/ReactFiberConfig.native.js b/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-legacy.js similarity index 76% rename from packages/react-reconciler/src/forks/ReactFiberConfig.native.js rename to packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-legacy.js index 3f8a28688b716..aae45be9aae50 100644 --- a/packages/react-reconciler/src/forks/ReactFiberConfig.native.js +++ b/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-legacy.js @@ -7,4 +7,4 @@ * @flow */ -export * from 'react-native-renderer/src/ReactFiberConfigNative'; +export * from 'react-dom-bindings/src/client/ReactDOMHostConfig'; diff --git a/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-node-webpack.js b/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-node-webpack.js new file mode 100644 index 0000000000000..aae45be9aae50 --- /dev/null +++ b/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-node-webpack.js @@ -0,0 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +export * from 'react-dom-bindings/src/client/ReactDOMHostConfig'; diff --git a/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-node.js b/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-node.js new file mode 100644 index 0000000000000..aae45be9aae50 --- /dev/null +++ b/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-node.js @@ -0,0 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +export * from 'react-dom-bindings/src/client/ReactDOMHostConfig'; diff --git a/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-relay.js b/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-relay.js new file mode 100644 index 0000000000000..aae45be9aae50 --- /dev/null +++ b/packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-relay.js @@ -0,0 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +export * from 'react-dom-bindings/src/client/ReactDOMHostConfig'; diff --git a/packages/react-reconciler/src/forks/ReactFiberHostConfig.fabric.js b/packages/react-reconciler/src/forks/ReactFiberHostConfig.fabric.js new file mode 100644 index 0000000000000..ff3aa4d230c6b --- /dev/null +++ b/packages/react-reconciler/src/forks/ReactFiberHostConfig.fabric.js @@ -0,0 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +export * from 'react-native-renderer/src/ReactFabricHostConfig'; diff --git a/packages/react-reconciler/src/forks/ReactFiberHostConfig.native-relay.js b/packages/react-reconciler/src/forks/ReactFiberHostConfig.native-relay.js new file mode 100644 index 0000000000000..ff3aa4d230c6b --- /dev/null +++ b/packages/react-reconciler/src/forks/ReactFiberHostConfig.native-relay.js @@ -0,0 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +export * from 'react-native-renderer/src/ReactFabricHostConfig'; diff --git a/packages/react-reconciler/src/forks/ReactFiberHostConfig.native.js b/packages/react-reconciler/src/forks/ReactFiberHostConfig.native.js new file mode 100644 index 0000000000000..ac4c2512bf4eb --- /dev/null +++ b/packages/react-reconciler/src/forks/ReactFiberHostConfig.native.js @@ -0,0 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +export * from 'react-native-renderer/src/ReactNativeHostConfig'; diff --git a/packages/react-reconciler/src/forks/ReactFiberHostConfig.test.js b/packages/react-reconciler/src/forks/ReactFiberHostConfig.test.js new file mode 100644 index 0000000000000..d2d908ef542b5 --- /dev/null +++ b/packages/react-reconciler/src/forks/ReactFiberHostConfig.test.js @@ -0,0 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +export * from 'react-test-renderer/src/ReactTestHostConfig'; diff --git a/packages/react-refresh/src/ReactFreshRuntime.js b/packages/react-refresh/src/ReactFreshRuntime.js index 83650e1badc39..c9706041ce1ff 100644 --- a/packages/react-refresh/src/ReactFreshRuntime.js +++ b/packages/react-refresh/src/ReactFreshRuntime.js @@ -7,7 +7,7 @@ * @flow */ -import type {Instance} from 'react-reconciler/src/ReactFiberConfig'; +import type {Instance} from 'react-reconciler/src/ReactFiberHostConfig'; import type {FiberRoot} from 'react-reconciler/src/ReactInternalTypes'; import type { Family, diff --git a/packages/react-test-renderer/src/ReactFiberConfigTestHost.js b/packages/react-test-renderer/src/ReactTestHostConfig.js similarity index 94% rename from packages/react-test-renderer/src/ReactFiberConfigTestHost.js rename to packages/react-test-renderer/src/ReactTestHostConfig.js index 2d6c087c81f9c..e306f9e1a0b03 100644 --- a/packages/react-test-renderer/src/ReactFiberConfigTestHost.js +++ b/packages/react-test-renderer/src/ReactTestHostConfig.js @@ -42,12 +42,12 @@ export type EventResponder = any; export type RendererInspectionConfig = $ReadOnly<{}>; -export * from 'react-reconciler/src/ReactFiberConfigWithNoPersistence'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoHydration'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoTestSelectors'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoMicrotasks'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoResources'; -export * from 'react-reconciler/src/ReactFiberConfigWithNoSingletons'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoPersistence'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoHydration'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoTestSelectors'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoMicrotasks'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoResources'; +export * from 'react-reconciler/src/ReactFiberHostConfigWithNoSingletons'; const NO_CONTEXT = {}; const UPDATE_SIGNAL = {}; diff --git a/packages/react-test-renderer/src/ReactTestRenderer.js b/packages/react-test-renderer/src/ReactTestRenderer.js index 26e6d154f32fc..2080c287a86f5 100644 --- a/packages/react-test-renderer/src/ReactTestRenderer.js +++ b/packages/react-test-renderer/src/ReactTestRenderer.js @@ -12,7 +12,7 @@ import type { PublicInstance, Instance, TextInstance, -} from './ReactFiberConfigTestHost'; +} from './ReactTestHostConfig'; import * as React from 'react'; import * as Scheduler from 'scheduler/unstable_mock'; @@ -50,7 +50,7 @@ import getComponentNameFromType from 'shared/getComponentNameFromType'; import ReactVersion from 'shared/ReactVersion'; import {checkPropStringCoercion} from 'shared/CheckStringCoercion'; -import {getPublicInstance} from './ReactFiberConfigTestHost'; +import {getPublicInstance} from './ReactTestHostConfig'; import {ConcurrentRoot, LegacyRoot} from 'react-reconciler/src/ReactRootTags'; import {allowConcurrentByDefault} from 'shared/ReactFeatureFlags'; diff --git a/scripts/flow/createFlowConfigs.js b/scripts/flow/createFlowConfigs.js index 4b832be83cb42..0193f323dc1f9 100644 --- a/scripts/flow/createFlowConfigs.js +++ b/scripts/flow/createFlowConfigs.js @@ -51,7 +51,7 @@ function writeConfig(renderer, rendererInfo, isServerSupported) { .replace( '%REACT_RENDERER_FLOW_OPTIONS%', ` -module.name_mapper='ReactFiberConfig$$' -> 'forks/ReactFiberConfig.${renderer}' +module.name_mapper='ReactFiberHostConfig$$' -> 'forks/ReactFiberHostConfig.${renderer}' module.name_mapper='ReactServerStreamConfig$$' -> 'forks/ReactServerStreamConfig.${serverRenderer}' module.name_mapper='ReactFizzConfig$$' -> 'forks/ReactFizzConfig.${serverRenderer}' module.name_mapper='ReactFlightServerConfig$$' -> 'forks/ReactFlightServerConfig.${serverRenderer}' diff --git a/scripts/jest/setupHostConfigs.js b/scripts/jest/setupHostConfigs.js index 2ed0fe91a8828..ae19851df93e7 100644 --- a/scripts/jest/setupHostConfigs.js +++ b/scripts/jest/setupHostConfigs.js @@ -60,7 +60,7 @@ jest.mock('react/react.shared-subset', () => { // When testing the custom renderer code path through `react-reconciler`, // turn the export into a function, and use the argument as host config. -const shimHostConfigPath = 'react-reconciler/src/ReactFiberConfig'; +const shimHostConfigPath = 'react-reconciler/src/ReactFiberHostConfig'; jest.mock('react-reconciler', () => { return config => { jest.mock(shimHostConfigPath, () => config); @@ -104,7 +104,7 @@ jest.mock('react-client/flight', () => { }); const configPaths = [ - 'react-reconciler/src/ReactFiberConfig', + 'react-reconciler/src/ReactFiberHostConfig', 'react-client/src/ReactFlightClientConfig', 'react-server/src/ReactServerStreamConfig', 'react-server/src/ReactFizzConfig', diff --git a/scripts/rollup/forks.js b/scripts/rollup/forks.js index d51e784f68378..5f6c984604266 100644 --- a/scripts/rollup/forks.js +++ b/scripts/rollup/forks.js @@ -246,7 +246,7 @@ const forks = Object.freeze({ } }, - './packages/react-reconciler/src/ReactFiberConfig.js': ( + './packages/react-reconciler/src/ReactFiberHostConfig.js': ( bundleType, entry, dependencies, @@ -261,11 +261,11 @@ const forks = Object.freeze({ // eslint-disable-next-line no-for-of-loops/no-for-of-loops for (let rendererInfo of inlinedHostConfigs) { if (rendererInfo.entryPoints.indexOf(entry) !== -1) { - return `./packages/react-reconciler/src/forks/ReactFiberConfig.${rendererInfo.shortName}.js`; + return `./packages/react-reconciler/src/forks/ReactFiberHostConfig.${rendererInfo.shortName}.js`; } } throw new Error( - 'Expected ReactFiberConfig to always be replaced with a shim, but ' + + 'Expected ReactFiberHostConfig to always be replaced with a shim, but ' + `found no mention of "${entry}" entry point in ./scripts/shared/inlinedHostConfigs.js. ` + 'Did you mean to add it there to associate it with a specific renderer?' );