forked from chentong1966/expo-plaid-link
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
39 lines (36 loc) · 1.28 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import PlaidClient from './components';
export default function App() {
return (
<View style={{flex: 1}}>
<Text>Plaid Client</Text>
<PlaidClient
selectAccount="false"
env="sandbox"
PublicKey=""
origin='localhost'
product="auth,transactions"
clientName="Plaid Link"
webhook="https://requestb.in"
PlaidLinkUri = 'https://cdn.plaid.com/link/v2/stable/link.html'
onLoad={onLoad}
onEvent={onEvent}
onConnected={onConnected}
onExit={onExit}
onReady={onReady}
onAcknowledged={onAcknowledged}
onMessage={onMessage}
onPlaidRef={onPlaidRef}
/>
</View>
);
}
function onLoad(msg){console.log('call back onLoad:',msg)}
function onReady(msg){console.log('call back onReady:',msg)}
function onAcknowledged(msg){console.log('call back onAcknowledged:',msg)}
function onConnected(msg){console.log('call back onConnected:',msg)}
function onExit(msg){console.log('call back onExit:',msg)}
function onEvent(msg){console.log('call back onEvent:',msg)}
function onMessage(msg){console.log('call back onMessage:',msg)};
function onPlaidRef(msg){console.log('call back onPlaidRef:',msg)};