Skip to main content
The SDK ships as a single npm package: @insito/react-native. It works in Expo managed, Expo bare, and CLI React Native projects.
The SDK is in public beta (0.x). It’s production-usable, but the API may still change between minor versions until 1.0 — pin an exact version if you need stability.

Requirements

The survey modal is a @gorhom/bottom-sheet bottom sheet, so gesture-handler and reanimated are required peers.

Install

react-native-reanimated requires its Babel plugin (add react-native-reanimated/plugin as the last entry in babel.config.js). Import react-native-gesture-handler at the very top of your entry file, per the library’s setup docs.

Native rebuild

If you’re on bare React Native, run a native rebuild once after install — npx pod-install on iOS, then rebuild your dev client. Expo managed workflows pick this up automatically on the next expo start.

Initialise the SDK

MicroSurvey.init() boots the singleton. Call it once, as early as possible — module top-level is fine.
app/_layout.tsx
init() validates the key (proj_xxx format) and throws synchronously if it’s malformed — easier to catch in development than a delayed network error.

Wire up the provider

<InsitoProvider> is the React layer that renders the survey bottom sheet. Put it near the root of your tree. Because the sheet uses gesture-handler, the whole app must be wrapped in a GestureHandlerRootView.
app/_layout.tsx
The provider is self-contained — it renders the bottom sheet with its own BottomSheetModalProvider, so you don’t need to add one yourself. Just make sure it sits under GestureHandlerRootView.

Identify your user

Once a user signs in (or as early as you have a stable userId), call identify(). The SDK caches identity for 24 hours so repeat sessions are free.
See Configure for the full InsitoConfig schema, API reference for every method, and the example app for a working Expo Router setup.