ideacreation / react-native-barcodescanner

A barcode scanner component for react native - not maintained anymore - use react-native-camera
MIT License
537 stars 162 forks source link

when i set the 'onBarCodeRead' prop will make me app jam. #84

Closed DeFenceD closed 6 years ago

DeFenceD commented 6 years ago

If I set 'onBarCodeRead' , when i first time into scan it is OK, then i navigate to other view. Now, I navigate into Scan view again, it will make me app jam, the screen will freeze. I check the cause, when I set the props 'onBarCodeRead' can encounter this problem.

This is my camera and my navigation. <BarcodeScanner onBarCodeRead={this.barcodeReceived} style={{ flex: 1 }} />

Change view by this. navigation.navigate('Scan', {task: 'scanAuthCode'});

My environment "react": "16.0.0-alpha.12" "react-native": "^0.47.2" "react-native-barcodescanner": "^3.1.1" "react-navigation": "^1.0.0-beta.12"