Category : barcode-scanner

export default function App() { const [hasPermission, setHasPermission] = useState(null); const [scanned, setScanned] = useState(false); const [data, setData] = useState(""); useEffect(() => { (async () => { const { status } = await BarCodeScanner.requestPermissionsAsync(); setHasPermission(status === "granted"); })(); }, []); const handleBarCodeScanned = ({ data }) => { setScanned(true); alert(`Bar code with data ${data} has ..

Read more