Open yellowh2art opened 2 years ago
I want to block reading the barcode until success or failure is returned after verifying the value after reading the barcode.
Use a hook const local = useRef({ reading: false})
and set local.current.reading = true
in the onReadCode()
handler to block multiple reads from triggering.
Same issue: I know it can be prevented using a ref, but that shouldn't be like that.
Issue Description
Barcode is read even if scanBarcode value is set to false in ios
Steps to Reproduce / Code Snippets / Screenshots
<CameraScreen
showFrame={false} // Show/hide scan frame scanBarcode={false} // Can restrict for the QR Code only laserColor={'blue'} // Color can be of your choice frameColor={'yellow'} // If frame is visible then frame color colorForScannerFrame={'black'} // Scanner Frame color onReadCode={(event) => onBarcodeScan(event.nativeEvent.codeStringValue) //Alert.alert('QR code found') } />
Environment