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
| Type | Description |
|---|---|
ReadyEvent | Onboarding loaded and ready |
OnboardingStartEvent | User started the onboarding |
OnboardingCompleteEvent | User completed the onboarding |
OnboardingExitEvent | User exited before completing |
ScreenViewEvent | Screen was displayed |
ScreenLeaveEvent | User left a screen |
NavigationBackEvent | User navigated back |
ButtonClickEvent | Button was clicked |
ChoiceSelectEvent | Choice was selected |
ChoiceDeselectEvent | Choice was deselected |
See Events for detailed field documentation.
Last updated on