Make ViewNativeComponent use ES6 exports

Summary: We will need to use ES6 exports when we switch this to use the codegen'd view configs. I also need to have a named export from this file.

Reviewed By: rickhanlonii

Differential Revision: D15923789

fbshipit-source-id: 513e27834583b6d021ff06d5d7f116ccdcd27722
This commit is contained in:
Eli White
2019-06-20 18:29:41 -07:00
committed by Facebook Github Bot
parent 28f1aac88c
commit a62490808d
2 changed files with 4 additions and 6 deletions
+1 -3
View File
@@ -10,8 +10,6 @@
'use strict';
const ViewNativeComponent = require('./ViewNativeComponent');
import type {ViewProps} from './ViewPropTypes';
export type Props = ViewProps;
@@ -23,4 +21,4 @@ export type Props = ViewProps;
*
* @see http://facebook.github.io/react-native/docs/view.html
*/
module.exports = ((ViewNativeComponent: $FlowFixMe): typeof ViewNativeComponent);
module.exports = require('./ViewNativeComponent').default;
@@ -18,6 +18,6 @@ import type {ViewProps} from './ViewPropTypes';
type ViewNativeComponentType = Class<ReactNative.NativeComponent<ViewProps>>;
const NativeViewComponent = requireNativeComponent('RCTView');
module.exports = ((NativeViewComponent: any): ViewNativeComponentType);
export default ((requireNativeComponent(
'RCTView',
): any): ViewNativeComponentType);