Guide
How to add an NPS survey to a React Native or Expo app
A Net Promoter Score survey asks one question: how likely are you to recommend us? Here's how to show it natively in a React Native or Expo app, to the right people at the right moment.
Install a survey SDK that renders natively in React Native, wrap your app in its provider, and trigger the NPS survey on an event that shows the user has had a real experience, like a second order. With MicroSurveys it's one package (it runs in Expo Go, with no native code of its own), a provider around your app, and either the Amplitude plugin or a track() call. The question, timing and look are set in the console, so changing them needs no app release.
What an NPS survey measures
Net Promoter Score (NPS) asks “How likely are you to recommend [product] to a friend or colleague?” on a scale from 0 to 10, and turns the answers into one number:
- Promoters answer 9 or 10.
- Passives answer 7 or 8.
- Detractors answer 0 to 6.
- NPS = % promoters − % detractors, so it runs from −100 to 100.
The score is useful as a trend: asked the same way over time, it shows whether loyalty is going up or down. The reasons behind it come from a follow-up question, which matters more than the number.
1. Install the SDK
The MicroSurveys React Native SDK is a JavaScript package with no native module of its own, so it works in Expo Go as well as development builds and bare React Native (0.72 or newer).
npx expo install @microsurveysai/react-native @react-native-async-storage/async-storage react-native-safe-area-contextIn a bare React Native app, use npm install with the same packages, then pod install in ios/.
2. Wrap your app
Create one SDK instance with your project's key and wrap your app in the provider. The provider loads the cached surveys, fetches the latest, and shows a survey over your app when its trigger fires.
import { MicroSurveys } from "@microsurveysai/react-native";
export const ms = new MicroSurveys({ apiKey: "ms_live_xxx" });import { MicroSurveysProvider } from "@microsurveysai/react-native";
import { ms } from "./microsurveys";
export default function App() {
return (
<MicroSurveysProvider instance={ms}>
<RootNavigator />
</MicroSurveysProvider>
);
}3. Trigger it at the right moment
Ask for NPS after someone has had enough of the product to have an opinion, not on first launch. Good triggers are a repeat action, like a second order, or the third time a core feature is used.
If you use Amplitude, add the plugin and every event you already track can be a trigger:
import { add, init } from "@amplitude/analytics-react-native";
import { ms } from "./microsurveys";
init("AMPLITUDE_API_KEY");
add(ms.amplitudePlugin());Without Amplitude, call track() where the moment happens:
import { useMicroSurveys } from "@microsurveysai/react-native";
const { track } = useMicroSurveys();
// after an order goes through
track("order_completed", { order_count: orders.length });Then, in the console, create a survey with an NPS question and set its trigger to order_completed. Use warmup to skip the first order, and a frequency cap so each person is asked at most every 90 days or so. See triggering surveys from Amplitude events for the options.
4. Add a follow-up question
Add an open-text question after the score, like “What's the main reason for your score?”. The score tells you how many people would recommend you; the follow-up tells you why. MicroSurveys groups those answers into themes with AI, so you can see, for example, that most detractors mention delivery times.
5. Make it look like your app
The survey renders as a native bottom sheet or centered dialog, follows light and dark mode, and moves out of the way of the keyboard. Colors, corners and copy come from the theme you set in the console. For a custom font, register it in your app (for example with expo-font) and pass its name:
<MicroSurveysProvider instance={ms} fontFamily="Inter">To show NPS on a screen instead of over the app, for example in a settings page, render it inline with <MicroSurvey surveyId="…" />. Full reference: React Native SDK docs.
Questions
Yes. The SDK is plain JavaScript with two common peer dependencies (AsyncStorage and safe-area-context), so it runs in Expo Go, development builds and bare React Native.
Rarely: once a quarter per person is common, and never more than every 90 days or so. Ask after a meaningful experience, and use a frequency cap so nobody sees it twice in a short time.
It depends heavily on the industry and how you ask, so compare yourself with your own score over time rather than with other companies. Any score above 0 means you have more promoters than detractors.
Yes. Surveys are cached on the device and triggers are checked locally. Answers given offline are queued and sent when the connection returns.
Ask your first question this week.
Free for 1,000 responses a month per project. No card, no demo call.
