diff --git a/Barcode.js b/Barcode.js index 0fdb6ac..61a4235 100644 --- a/Barcode.js +++ b/Barcode.js @@ -7,7 +7,7 @@ import React, { - PropTypes, + Component, } from 'react' import { @@ -16,7 +16,9 @@ import { NativeModules, AppState, Platform, + ViewPropTypes } from 'react-native' +import PropTypes from 'prop-types' const BarcodeManager = Platform.OS == 'ios' ? NativeModules.Barcode : NativeModules.CaptureModule @@ -34,7 +36,7 @@ export default class Barcode extends Component { } static propTypes = { - ...View.propTypes, + ...ViewPropTypes, onBarCodeRead: PropTypes.func.isRequired, barCodeTypes: PropTypes.array, scannerRectWidth: PropTypes.number, @@ -78,4 +80,4 @@ export default class Barcode extends Component { } } -const NativeBarCode = requireNativeComponent(Platform.OS == 'ios' ? 'RCTBarcode' : 'CaptureView', Barcode) +const NativeBarCode = requireNativeComponent(Platform.OS == 'ios' ? 'RCTBarcode' : 'CaptureView', Barcode) \ No newline at end of file diff --git a/android/src/main/java/com/reactnativecomponent/barcode/RCTCapturePackage.java b/android/src/main/java/com/reactnativecomponent/barcode/RCTCapturePackage.java index f0a397d..50a3f28 100644 --- a/android/src/main/java/com/reactnativecomponent/barcode/RCTCapturePackage.java +++ b/android/src/main/java/com/reactnativecomponent/barcode/RCTCapturePackage.java @@ -38,11 +38,6 @@ public List createNativeModules(ReactApplicationContext reactAppli ); } - @Override - public List> createJSModules() { - return Collections.emptyList(); - } - @Override public List createViewManagers(ReactApplicationContext reactApplicationContext) { //noinspection ArraysAsListWithZeroOrOneArgument