onboardkit
v0.2.0
Published
Onboarding module for React Native
Maintainers
Readme
my-lib Remote Onboarding
This package renders onboarding steps from a remote endpoint and falls back gracefully when the API is unavailable.
Usage
import RemoteOnboarding from "my-lib";
<RemoteOnboarding
apiKey="YOUR_API_KEY"
isDev={__DEV__}
userLanguage="en"
onComplete={() => {
// navigate to the next screen
}}
/>;Props
apiKey(string, required)onComplete(function, required)isDev(boolean, optional)userLanguage(string, optional)theme,introPanel,backButtonIcon,wrapInModalOnWeb,animationDuration(optional)
Remote config
The hook useRemoteOnboardingConfig calls:
POST http://localhost:3000/api/convex/queryfunction: "sdk:getSteps"
Error and fallback behavior
- If the request fails, returns no steps, or returns no intro panel:
isDev: truerenders a fallback onboarding step with a message that values must be fetched and set on the site (not available yet).isDev: falseauto-callsonCompleteand renders nothing so users are not blocked.
