@canopyconnect/react-native-sdk v1.1.1
📦 @canopyconnect/react-native-sdk
💻 Getting Started
In the command terminal, run the following commands:
cd react-native-app
npm install @canopyconnect/react-native-sdk
⌨ Usage
import CanopyConnect from '@canopyconnect/react-native-sdk';
<CanopyConnect
open={this.state.isOpen}
publicAlias={'demo'}
onAuthenticationSuccess={(data) => {
// Close here if you want to exit after authentication
// this.setState({ isOpen: false });
// use data to setup listening for webhook
}}
onExit={(err, data) => {
this.setState({ isOpen: false });
if (err) {
// reprompt to submit data if err exists
} else {
// use data to setup listening for webhook
}
}}
pullMetaData={{
custom-data-id: '123-456'
}}
consentToken={'xxx'}
/>
Properties
Prop | Type | Description |
---|---|---|
open | boolean | Controls wether the modal is shown |
publicAlias | string | Specifies what link is used |
onAuthenticationSuccess(data) | function | Called when authentication is complete and user action is no longer required |
onExit(err, data) | function | Called when the user leaves mid flow or when flow is completed and 'Finish' is clicked on the last page |
onSelectCustomInsuranceProvider(data) | function | If enabled on the link, allows you to listen for when an unsupported carrier is selected |
pullMetaData | object | JSON serializable data that is saved onto the pull |
consentToken | string | Used to skip consent screen by collecting consent with your own view |
fullScreen | boolean | Force modal to take up the entire screen |
useSafeArea | boolean | If SafeAreaView should be used |
renderLoading | function | Returns component displayed while webview loads |
overlayStyle | object | Style for overlay |
backdropStyle | object | Style for backdrop |
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago