react-native-camera-kit
react-native-camera-kit copied to clipboard
Barcode types and data returns undefined
Describe the bug When I try to get barcode type and data it returns undefined. To Reproduce Steps to reproduce the behavior:
const [scanned, setScanned] = useState(false);
const handleBarCodeScanned = ({ type, data }) => {
console.log('Type: ' + type + '\nData: ' + data)
};
<CameraScreen
scanBarcode={true}
onReadCode={scanned ? undefined : handleBarCodeScanned}
showFrame={true}
laserColor="red"
frameColor="white"
/>
{scanned && <Button title={'Scan again?'} onPress={() => setScanned(false)} />}
Expected behavior should return barcode type and barcode itself
https://github.com/teslamotors/react-native-camera-kit/pull/633
I have added codeFormat please test and let know if any issues