I'm using react-zxing to scan barcodes on a web page.
I have two options for scanning the barcode,
You can see the live code: https://codesandbox.io/s/suspicious-jerry-1jr2xx?file=/src/App.js
P粉6086470332024-03-22 12:13:55
Try to add paused in the options of useZxing
.
The camera will stop when manualInput
is true
.
const { ref } = useZxing({ onResult(result) { setResult(result.getText()); }, paused: manualInput });