From 054a84b543fa1d99d7e9898ddcd1cbd8a03fe587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tayfun=20Y=C3=9C=C4=9ER=C3=9CK?= Date: Tue, 5 Sep 2017 22:54:44 +0300 Subject: [PATCH 1/2] RN 0.47 fix --- .../com/reactnativecomponent/barcode/RCTCapturePackage.java | 5 ----- 1 file changed, 5 deletions(-) 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 From db0786a5a3208220f349bd323249475d188670e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tayfun=20Y=C3=9C=C4=9ER=C3=9CK?= Date: Fri, 9 Mar 2018 00:18:40 +0300 Subject: [PATCH 2/2] propType fix --- Barcode.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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