Konrad Uciechowski Konrad Uciechowski - 3 years ago 259
Android Question

react-native on press button show touch ID view (iOS)

I'm making react-native app made with 'create-react-native-app' and expo SDK, I want to make it show touch ID view on press button. I know that expo client comes with all native stuff like: touch ID , contacts. But when I implement build in functions and test it by pressing button on my phone it shows an error.

This is an error that I get:

enter image description here

Here is part of code that I am working with

import React, {Component} from 'react';

import {
StyleSheet,
Text,
View,
Image,
StatusBar,
TextInput,
Button
} from 'react-native';

import Expo from 'expo';

class LoginButton extends Component {
render() {
if(Expo.Fingerprint.hasHardwareAsync()) {
return (
<Button onPress={Expo.Fingerprint.isEnrolledAsync()} title="Sign In" color="#2187BA" backgroundColor=""/>
)
}

}
}

Answer Source
onPress={()=>Expo.Fingerprint.isEnrolledAsync();}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download