Easy Labs
SDKsReact Native

Installation

Install @easylabs/react-native and verify your setup.

Prerequisites

  • React >= 18.0.0
  • React Native >= 0.79.0
  • Node.js >= 22 for tooling (Metro, Expo CLI)
  • An Easy Labs API key from the dashboard — sandbox keys start with sk_test_, production keys do not

The SDK works with both Expo (managed or prebuild) and bare React Native. It's compatible with the New Architecture (newArchEnabled: true).

@basis-theory/react-native-elements is bundled as a direct dependency — you do not install it yourself.

Install the package

pnpm add @easylabs/react-native
npm install @easylabs/react-native
yarn add @easylabs/react-native
bun add @easylabs/react-native

iOS native build

After installing, run pod install so Basis Theory's native iOS module links against your project:

cd ios && pod install && cd ..

On Expo prebuild and bare RN, this is required once per dependency change. On Expo Go (managed without prebuild), Basis Theory native modules are not available — use Expo's prebuild or a development build.

Verify the install

Wrap your app's root with EasyProvider and read a value from useEasy():

App.tsx
import { EasyProvider, useEasy } from '@easylabs/react-native';
import { Text, View } from 'react-native';

function Probe() {
  const { getCustomers } = useEasy();
  return <Text>Easy SDK loaded: {typeof getCustomers}</Text>;
}

export default function App() {
  return (
    <EasyProvider apiKey={process.env.EXPO_PUBLIC_EASY_API_KEY!}>
      <View style={{ flex: 1, justifyContent: 'center', padding: 24 }}>
        <Probe />
      </View>
    </EasyProvider>
  );
}

If the screen renders Easy SDK loaded: function, the SDK initialized, validated your API key, and provisioned a Basis Theory session.

Expo: put your key in EXPO_PUBLIC_EASY_API_KEY so it's exposed to the JS bundle. Bare RN: use react-native-config, react-native-dotenv, or your own native config — the SDK only cares that you pass a string into apiKey.

Next steps

On this page