diff --git a/Barcode.js b/Barcode.js index 0fdb6ac..3064013 100644 --- a/Barcode.js +++ b/Barcode.js @@ -5,18 +5,15 @@ * Copyright (c) 2016 react-native-component */ - -import React, { - PropTypes, - Component, -} from 'react' +import React, { Component } from 'react' import { - View, requireNativeComponent, NativeModules, AppState, Platform, + ViewPropTypes } from 'react-native' +import PropTypes from 'prop-types' const BarcodeManager = Platform.OS == 'ios' ? NativeModules.Barcode : NativeModules.CaptureModule @@ -34,7 +31,7 @@ export default class Barcode extends Component { } static propTypes = { - ...View.propTypes, + ...ViewPropTypes, onBarCodeRead: PropTypes.func.isRequired, barCodeTypes: PropTypes.array, scannerRectWidth: PropTypes.number, diff --git a/android/src/main/java/com/reactnativecomponent/barcode/RCTCapturePackage.java b/android/src/main/java/com/reactnativecomponent/barcode/RCTCapturePackage.java index f0a397d..fcedfae 100644 --- a/android/src/main/java/com/reactnativecomponent/barcode/RCTCapturePackage.java +++ b/android/src/main/java/com/reactnativecomponent/barcode/RCTCapturePackage.java @@ -38,7 +38,6 @@ public List createNativeModules(ReactApplicationContext reactAppli ); } - @Override public List> createJSModules() { return Collections.emptyList(); } diff --git a/package.json b/package.json index 23fd36e..cadc368 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,9 @@ "barcode", "scan" ], + "dependencies": { + "prop-types": "^15.6.1" + }, "author": "HISAME SHIZUMARU", "license": "MIT", "bugs": { @@ -25,4 +28,4 @@ "peerDependencies": { "react-native": ">=0.40.0" } -} +} \ No newline at end of file