mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
## Summary Migrate internal `Libraries/` import subpaths from `react-native` to the incoming dedicated entry points in React Native 0.87. **Motivation** See [**RFC0894: Removing deep imports from react-native**](https://github.com/react-native-community/discussions-and-proposals/pull/894) **Changes** The `react-private-interface` entry point has been created explicitly for the private contract between React ↔ React Native, and is 1:1 with the previous `ReactNativePrivateInterface` module. Both of the below `Libraries/` paths still exist, but are deprecated — this is a lagging migration that will enable cleanup in a future RN version. - `react-native/Libraries/Core/InitializeCore` → `react-native/setup-env` [react/react-native#57475](https://github.com/react/react-native/pull/57475) - `react-native/Libraries/ReactPrivate/ReactNativePrivateInterface` → `react-native/react-private-interface` [react/react-native#57495](https://github.com/react/react-native/pull/57495) ## Test Plan Flow
33 lines
745 B
JavaScript
33 lines
745 B
JavaScript
/**
|
|
* 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.
|
|
*
|
|
* @noformat
|
|
* @nolint
|
|
* @flow
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import {BatchedBridge} from 'react-native/react-private-interface';
|
|
|
|
import type {ReactFabricType} from './ReactNativeTypes';
|
|
|
|
let ReactFabric: ReactFabricType;
|
|
|
|
if (__DEV__) {
|
|
ReactFabric = require('../implementations/ReactFabric-dev');
|
|
} else {
|
|
ReactFabric = require('../implementations/ReactFabric-prod');
|
|
}
|
|
|
|
global.RN$stopSurface = ReactFabric.stopSurface;
|
|
|
|
if (global.RN$Bridgeless !== true) {
|
|
BatchedBridge.registerCallableModule('ReactFabric', ReactFabric);
|
|
}
|
|
|
|
export default ReactFabric;
|