test-trv-rn-sdk
v0.0.24
Published
test
Downloads
3
Readme
Truv React Native Bridge 
React Native library for integrating with the Truv Bridge
Install
Truv Bridge uses Webview under the hood and requires webview and cookies manager packages to be installed in the project.
With npm:
npm install @truv/react-native [email protected] @react-native-cookies/cookies@^6.2.1 --saveWith yarn
yarn add -S @truv/react-native [email protected] @react-native-cookies/cookies@^6.2.1Usage
import React, { useState } from 'react';
import TruvBridge from '@truv/react-native';
const BridgeElement = () => {
return (
<TruvBridge
bridgeToken={bridgeToken}
onClose={() => {
console.log('bridge closed');
}}
onError={() => {
console.log('bridge error');
}}
onEvent={(event) => console.log('event from bridge: ', event)}
onLoad={() => {
console.log('bridge loaded');
}}
onSuccess={() => {
console.log('bridge succeeded');
}}
/>
);
}
