diff --git a/Libraries/Components/View/View.js b/Libraries/Components/View/View.js index 7d61e30a111..f40a7536b37 100644 --- a/Libraries/Components/View/View.js +++ b/Libraries/Components/View/View.js @@ -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; diff --git a/Libraries/Components/View/ViewNativeComponent.js b/Libraries/Components/View/ViewNativeComponent.js index 21e57c8a437..36a71deed99 100644 --- a/Libraries/Components/View/ViewNativeComponent.js +++ b/Libraries/Components/View/ViewNativeComponent.js @@ -18,6 +18,6 @@ import type {ViewProps} from './ViewPropTypes'; type ViewNativeComponentType = Class>; -const NativeViewComponent = requireNativeComponent('RCTView'); - -module.exports = ((NativeViewComponent: any): ViewNativeComponentType); +export default ((requireNativeComponent( + 'RCTView', +): any): ViewNativeComponentType);