Closed mrjelveh closed 3 years ago
use the result.getText() method
<BarcodeScannerComponent
width={500}
height={500}
torch={torch}
facingMode="environment"
onUpdate={(err, result) => {
if (result) {
handleResult(result.getText());
}
}}
/>
Thanks it works
I have an issue when I'm using this library with typescript. When I wanted to use the object of result, I've got this TS error:
I can't access to
@zxing/library
types because it's private. So how can I fix this type issue?