Skip to main content
The React Native SDK is the kravata-sdk-plugin package. It exposes KravataWidgetComponent, which fills its container. Render it on a dedicated screen. It works with TypeScript and plain JavaScript.

Requirements

Install

1

Add the dependency

The package is distributed from a private GitHub repository. Add it to package.json with the GitHub token Kravata gives you and the version tag you want to use:
package.json
If your Git credentials for github.com already have access, you can use the short form "github:KravataGrp/kravata-sdk-react-native#v1.0.4".
Don’t commit the token to your repository. In CI, inject it from a secret.
2

Install the peer dependencies

3

Install the iOS pods

4

Allow network access on Android

Add the Internet permission to android/app/src/main/AndroidManifest.xml:
iOS needs no extra permissions.

Render the widget

Get sharedKey, nonce and clientId from your backend first (see Issue a widget session), then render the widget on a full screen.
KravataScreen.tsx

With React Navigation

Register the screen without a header and navigate to it:
App.tsx
HomeScreen.tsx

Parameters

Widget events

New event types can be added in future versions; ignore the ones you don’t handle.

Next steps

Backend integration

Issue widget sessions, receive user.accepted_terms and register the user.

Overview

Environments, credentials and the end-to-end flow.