Installation
Install @easylabs/react-native and verify your setup.
Prerequisites
- React
>= 18.0.0 - React Native
>= 0.79.0 - Node.js
>= 22for 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-nativenpm install @easylabs/react-nativeyarn add @easylabs/react-nativebun add @easylabs/react-nativeiOS 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():
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_KEYso it's exposed to the JS bundle. Bare RN: usereact-native-config,react-native-dotenv, or your own native config — the SDK only cares that you pass a string intoapiKey.
Next steps
- Quickstart — render your first payment.
- EasyProvider — the SDK's entry point.
- Elements — native card and bank inputs.