OnboardingYakDocumentation
DocsInstall the SDK
INSTALL THE SDK

Install with Expo

Set up OnboardingYak in an Expo-managed or Expo development-build project.

Requirements#

Use a React Native 0.73 or later Expo project. The SDK depends on AsyncStorage for cached flows, saved onboarding progress, and stable experiment assignment, plus safe-area context for device insets.

Install the SDK#

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

Then install feature-specific modules as needed. Common examples:

Optional modules
npx expo install expo-haptics expo-video expo-camera expo-location

Only include modules your flow and application use. For the app-specific command, open Studio → your app → App settings → SDK connection.

Create or rebuild a development client#

After adding or changing a native dependency, rebuild the native app. Restarting Metro alone does not include a new native module in an installed binary.

Local iOS build
npx expo run:ios
Local Android build
npx expo run:android

If you use EAS Build, create a new development build and install it on the device.

Initialize#

Render the component inside your app’s navigation tree. Pass your studio app’s ID, publishable key, and the correct baseUrl. Keep a valid fallback flow in the bundle.

React Native
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.
      }}
    />
  );
}