diff --git a/Libraries/Components/MaskedView/MaskedViewIOS.ios.js b/Libraries/Components/MaskedView/MaskedViewIOS.ios.js index ce860ac2e..b8af448da 100644 --- a/Libraries/Components/MaskedView/MaskedViewIOS.ios.js +++ b/Libraries/Components/MaskedView/MaskedViewIOS.ios.js @@ -11,13 +11,10 @@ const React = require('React'); const StyleSheet = require('StyleSheet'); const View = require('View'); - -const requireNativeComponent = require('requireNativeComponent'); +const RCTMaskedViewNativeComponent = require('RCTMaskedViewNativeComponent'); import type {ViewProps} from 'ViewPropTypes'; -const RCTMaskedView = requireNativeComponent('RCTMaskedView'); - type Props = $ReadOnly<{| ...ViewProps, @@ -83,12 +80,12 @@ class MaskedViewIOS extends React.Component { } return ( - + {maskElement} {children} - + ); } } diff --git a/Libraries/Components/MaskedView/RCTMaskedViewNativeComponent.js b/Libraries/Components/MaskedView/RCTMaskedViewNativeComponent.js new file mode 100644 index 000000000..b2cb472f4 --- /dev/null +++ b/Libraries/Components/MaskedView/RCTMaskedViewNativeComponent.js @@ -0,0 +1,24 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + * @flow + */ + +const requireNativeComponent = require('requireNativeComponent'); + +import type {ViewProps} from 'ViewPropTypes'; +import type {NativeComponent} from 'ReactNative'; + +type NativeProps = $ReadOnly<{| + ...ViewProps, +|}>; + +type RCTMaskedViewNativeType = Class>; + +module.exports = ((requireNativeComponent( + 'RCTMaskedView', +): any): RCTMaskedViewNativeType);