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:
Родитель
28f1aac88c
Коммит
a62490808d
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче