Skip to content

Instantly share code, notes, and snippets.

@rafaelmotta
Last active October 21, 2022 17:37
Show Gist options
  • Save rafaelmotta/0b80819d60eef20204dad7d8f79d1ad2 to your computer and use it in GitHub Desktop.
Save rafaelmotta/0b80819d60eef20204dad7d8f79d1ad2 to your computer and use it in GitHub Desktop.
React Native Integration
import { FootprintButton } from '@onefooprint/footprint-react-native';
import { View, StyleSheet } from 'react-native';
const Screen = () => {
const handleCompleted = (validationToken: string) => {
console.log(validationToken)
}
const handleCanceled = () => {
console.log('user canceled')
}
return (
<View styles={styles.main}>
<FootprintButton
publicKey="ob_test_WNgSBRR7uxoT8JRDBBflgw"
onCompleted={handleCompleted}
onCanceled={handleCanceled}
/>
</View>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center'
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment