OnboardingYakDocumentation
DocsGet started
GET STARTED

Quickstart

Install the React Native package, render your first flow, and verify events in Studio.

Before you start#

You need an OnboardingYak account, a React Native app, and an app entry in Studio. Create the app first so the SDK guide can provide its exact app ID, publishable key, and enabled capabilities.

In Studio, open your app and go to App settings → SDK connection. The generated guide is specific to that app.

Install the package#

For Expo, use Expo’s installer so it can select versions compatible with your Expo SDK:

Terminal
npx expo install @onboarding-yak/react-native @react-native-async-storage/async-storage react-native-safe-area-context

Install optional Expo modules only when your flow uses the matching feature. Studio’s capability selection adds the needed packages to the generated command.

Render onboarding#

Import Onboarding and render it on the screen where you want the first-run experience. Replace the placeholders with the values from your app’s SDK connection settings.

OnboardingScreen.tsx
import { Onboarding } from '@onboarding-yak/react-native';
import { fallbackFlow } from './fallback-flow';

export function OnboardingScreen() {
  return (
    <Onboarding
      flowId="YOUR_APP_ID"
      apiKey="oy_pub_YOUR_PUBLISHABLE_KEY"
      baseUrl="https://onboardingyak.com"
      fallbackFlow={fallbackFlow}
      onComplete={(answers, { variables }) => {
        // Continue into your app and save any answers you need.
      }}
    />
  );
}

The fallback is shown immediately while the SDK fetches the published flow, and remains available if the request fails. See Initialize the SDK for a complete fallback example.

Verify the integration#

  1. Build and launch the app on a simulator or device.
  2. Open Studio and publish at least one flow for this app.
  3. Start the app again. The SDK fetches the latest published version.
  4. Open Analytics and confirm that the session appears. Development builds are labeled development automatically.