mirror of
https://github.com/facebook/react.git
synced 2026-02-24 20:53:03 +00:00
## Summary I'm working to get the main `react-native` package parsable by modern Flow tooling (both `flow-bundler`, `flow-api-translator`), and one blocker is legacy `module.exports` syntax. This diff updates files which are [synced to `react-native`](https://github.com/facebook/react-native/tree/main/packages/react-native/Libraries/Renderer/shims) from this repo. ## How did you test this change? Files were pasted into `react-native-github` under fbsource, where Flow validates ✅.
24 lines
533 B
JavaScript
24 lines
533 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 type {ReactNativeType} from './ReactNativeTypes';
|
|
|
|
let ReactNative: ReactNativeType;
|
|
|
|
if (__DEV__) {
|
|
ReactNative = require('../implementations/ReactNativeRenderer-dev');
|
|
} else {
|
|
ReactNative = require('../implementations/ReactNativeRenderer-prod');
|
|
}
|
|
|
|
export default ReactNative;
|