Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_selectPrinterAsync = async () => {
try {
const selectedPrinter = await Print.selectPrinterAsync();
this.setState({ selectedPrinter });
} catch (e) {
Alert.alert('Something went wrong: ', e.message);
}
}
_selectPrinterAsync = async () => {
try {
const selectedPrinter = await Print.selectPrinterAsync();
this.setState({ selectedPrinter });
} catch (e) {
Alert.alert('Something went wrong: ', e.message);
}
};