Start > React Native / Expo
Start > React Native / ExpoKroxt BaaS SDK v1.0.5

React Native / Expo

Connect your Expo and React Native applications using mobile AsyncStorage adapters.

Instant Setup

Run npx create-kroxt-app and select **React Native (Expo)**.

1. Install Storage Adapter

terminal
1
npx expo install @react-native-async-storage/async-storage

2. Initialize Client

Configure AsyncStorage to allow the SDK to persist session state securely on the device:

src/kroxt.ts
1
2
3
4
5
6
7
8
9
10
11
import { Kroxt } from "@kroxt/baas-sdk";
import AsyncStorage from "@react-native-async-storage/async-storage";
import { KROXT_PROJECT_ID, KROXT_API_KEY } from "./config";

export const baas = new Kroxt({
  projectId: KROXT_PROJECT_ID,
  apiKey: KROXT_API_KEY,
  storage: AsyncStorage,
});

export default baas;