Feature Flags, Toggles & A/B Testing

Everything you need for turbocharging your modern product development

React Native SDK for Statsig

import Tabs from “@theme/Tabs”; import TabItem from “@theme/TabItem”;

Statsig client side SDK for applications in React Native not using Expo. If you are using Expo, check out our Expo SDK. This SDK is based on our JavaScript client SDK.

Installation

You can install the SDK via npm or yarn. In your project directory, run:

npm install statsig-react-native
yarn add statsig-react-native

Next, let’s install the dependencies we need for the SDK to work:

npm install @react-native-async-storage/async-storage react-native-device-info react-native-get-random-values
yarn add @react-native-async-storage/async-storage react-native-device-info react-native-get-random-values

Lastly, if you are on a Mac and developing for iOS, you need to install the pods to complete the linking:

npx pod-install ios # or pod install, in your /ios folder

Next you can import Statsig in your code and use it away!

import Statsig from "statsig-react-native";

Usage

Because our React Native SDK is based on our JavaScript client SDK, you can use them exactly the same way. Check out the usage guide to learn about how to initialize Statsig and use Feature Gates or Dynamic Configs.