I am new to React-Native & created a QR Scanner App. After scanning want to open url onClick/onPress.
-- Here is the code
onSuccess = (e) => { setResult(e.data) setScan(false) }
// Start scanner startScan = () => { setScan(true) setResult() }
<QRCodeScanner
reactivate={true}
showMarker={true}
ref={(node) => { this.scanner = node }}
onRead={this.onSuccess}
topContent={
<Text style={styles.centerText}>
Scan your QRCode!
</Text>
}
bottomContent={
<TouchableOpacity style={styles.buttonTouchable} onPress={() => setScan(false)}>
<Text style={styles.buttonText}>Cancel Scan</Text>
</TouchableOpacity>
}
/>