Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
NfcManager.isSupported()
.then(supported => {
this.setState({ supported });
if (supported) {
this._startNfc();
}
})
}
export function nfc_initialization(props, deviceId) {
NfcManager.isSupported().then(result => {
if (result) {
check_tagged_nfc_card(props, deviceId);
} else {
showToastDanger("Device does not support NFC");
}
});
}
componentDidMount() {
NfcManager.isSupported()
.then(supported => {
this.setState({ supported });
if (supported) {
this._startNfc();
}
})
}