2018-02-13 02:12:46 +08:00
|
|
|
/**
|
2018-09-08 06:11:23 +08:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2018-02-13 02:12:46 +08:00
|
|
|
*
|
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
|
*
|
2018-05-15 08:47:47 +08:00
|
|
|
* @format
|
2018-02-13 02:12:46 +08:00
|
|
|
* @flow
|
|
|
|
|
*/
|
2018-05-15 08:47:47 +08:00
|
|
|
|
2018-02-13 02:12:46 +08:00
|
|
|
'use strict';
|
|
|
|
|
|
2019-06-03 22:58:31 +08:00
|
|
|
import {BatchedBridge} from 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface';
|
2018-03-20 22:56:18 +08:00
|
|
|
|
2021-06-10 20:59:22 +08:00
|
|
|
import type {ReactFabricType} from './ReactNativeTypes';
|
2018-02-13 02:12:46 +08:00
|
|
|
|
|
|
|
|
let ReactFabric;
|
|
|
|
|
|
|
|
|
|
if (__DEV__) {
|
2019-06-03 22:58:31 +08:00
|
|
|
ReactFabric = require('../implementations/ReactFabric-dev');
|
2018-02-13 02:12:46 +08:00
|
|
|
} else {
|
2019-06-03 22:58:31 +08:00
|
|
|
ReactFabric = require('../implementations/ReactFabric-prod');
|
2018-02-13 02:12:46 +08:00
|
|
|
}
|
|
|
|
|
|
2020-01-11 02:21:32 +08:00
|
|
|
if (global.RN$Bridgeless) {
|
|
|
|
|
global.RN$stopSurface = ReactFabric.stopSurface;
|
|
|
|
|
} else {
|
|
|
|
|
BatchedBridge.registerCallableModule('ReactFabric', ReactFabric);
|
|
|
|
|
}
|
2018-03-20 22:56:18 +08:00
|
|
|
|
2021-06-10 20:59:22 +08:00
|
|
|
module.exports = (ReactFabric: ReactFabricType);
|