The SDK ships as a single npm package:Documentation Index
Fetch the complete documentation index at: https://docs.insito.app/llms.txt
Use this file to discover all available pages before exploring further.
@insito/react-native. It works
in Expo managed, Expo bare, and CLI React Native projects.
Requirements
| Peer | Minimum version |
|---|---|
react | 18.0 |
react-native | 0.72 |
@react-native-async-storage/async-storage | 1.21 |
Install
The SDK uses
AsyncStorage as a peer dependency for the persistent
response queue (responses survive bad networks and app cold-starts).
If your project already uses AsyncStorage, no extra setup is needed.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 modal. Put it
near the root of your tree, inside your navigation container.
app/_layout.tsx
Identify your user
Once a user signs in (or as early as you have a stableuserId),
call identify(). The SDK caches identity for 24 hours so repeat
sessions are free.
InsitoConfig schema, API reference
for every method, and the example app
for a working Expo Router setup.