@truv/react-native
TypeScript icon, indicating that this package has built-in type declarations

3.0.0-beta.20 • Public • Published

Truv React Native Bridge npm version

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@3.0.0
cd ios && pod install

With yarn

yarn add -S @truv/react-native@3.0.0
cd ios && pod install

Add the following to repositories section in your android/build.gradle file

        maven { setUrl("https://jitpack.io") }

### Usage

```jsx
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');
        }}
    />
  );
}

Dependencies (0)

    Dev Dependencies (6)

    Package Sidebar

    Install

    npm i @truv/react-native

    Homepage

    truv.com

    Weekly Downloads

    29

    Version

    3.0.0-beta.20

    License

    ISC

    Unpacked Size

    52.7 kB

    Total Files

    20

    Last publish

    Collaborators

    • sergnek
    • vesai_citadelid
    • dmitrydorofeev-citadel