Skip to Content
API ReferenceTypeScript Types

TypeScript Types

All types are exported from the package.

Import

import type { BegynnOnboardingProps, BegynnOnboardingRef, SDKEvent, SDKEventType, SDKMessage, ReadyEvent, OnboardingStartEvent, OnboardingCompleteEvent, OnboardingExitEvent, ScreenViewEvent, ScreenLeaveEvent, NavigationBackEvent, ButtonClickEvent, ChoiceSelectEvent, ChoiceDeselectEvent, OnboardingPayload, } from "@begynn/react-native";

Component Types

BegynnOnboardingProps

Props for the BegynnOnboarding component.

BegynnOnboardingRef

Ref interface with imperative methods (reload()).

Event Types

SDKEventType

Union of all event type strings:

type SDKEventType = | 'ready' | 'onboarding_start' | 'onboarding_complete' | 'onboarding_exit' | 'screen_view' | 'screen_leave' | 'navigation_back' | 'button_click' | 'choice_select' | 'choice_deselect';

SDKEvent

Union of all event interfaces. Use for the onEvent handler.

OnboardingPayload

User choices from choicelists:

type OnboardingPayload = Record<string, string[]>;

Example:

{ "choicelist-goals": ["fitness", "nutrition"], "choicelist-experience": ["beginner"] }

Individual Event Types

TypeDescription
ReadyEventOnboarding loaded and ready
OnboardingStartEventUser started the onboarding
OnboardingCompleteEventUser completed the onboarding
OnboardingExitEventUser exited before completing
ScreenViewEventScreen was displayed
ScreenLeaveEventUser left a screen
NavigationBackEventUser navigated back
ButtonClickEventButton was clicked
ChoiceSelectEventChoice was selected
ChoiceDeselectEventChoice was deselected

See Events for detailed field documentation.

Last updated on