import React, { PureComponent } from 'react'; import PropTypes, { InferProps } from 'prop-types'; import { requireNativeComponent, Platform } from 'react-native'; import { ViewPropTypes } from 'deprecated-react-native-prop-types'; const propTypes = { document: PropTypes.string.isRequired, ...ViewPropTypes, } // Generates the prop types for TypeScript users, from PropTypes. type PDFViewCtrlProps = InferProps; export class PDFViewCtrl extends PureComponent { static propTypes = propTypes; render() { return ( ) } } const name = Platform.OS === 'ios' ? 'RNTPTPDFViewCtrl' : 'RCTPDFViewCtrl'; const RCTPDFViewCtrl = requireNativeComponent(name);