npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-onboarding-sdk

v1.0.6

Published

A TypeScript SDK for fetching onboarding data from backend APIs with React hooks support

Downloads

16

Readme

react-onboarding-sdk

Mobile-first, Expo-focused onboarding SDK for React Native apps. Fetches onboarding flows from your backend and renders professional screens with automatic navigation and data collection.

Installation

npm install react-onboarding-sdk
# peer deps expected in the host app
npm install react-native expo @react-native-async-storage/async-storage expo-document-picker

Quick Start

import { Onboarding } from 'react-onboarding-sdk';

export default function App() {
  return (
    <Onboarding
      appId="sample-app-id"
      baseUrl="http://192.168.0.105:3000/onboarding"
      onFinish={(collected) => console.log(collected)}
    />
  );
}

Props

  • appId (string, required): Application identifier used to fetch the onboarding config
  • baseUrl (string, optional): Defaults to http://192.168.0.105:3000/onboarding. The SDK will call GET {baseUrl}/{appId}
  • onFinish (function, optional): Called with all collected data when onboarding completes

Data Flow

  • The SDK fetches from GET {baseUrl}/{appId} and expects an envelope { success: boolean, data: OnboardingData }
  • If the network fails, it falls back to a local JSON config bundled with the package
  • The SDK caches the last successful config using AsyncStorage for basic offline support

Screen Types

  • text: Title + subtitle with configurable colors
  • fileUpload: Uses expo-document-picker to select a file; filename is stored
  • banner: Large banner style with CTA buttons

Collected Data Shape

{
  [screenId: string]: {
    screenId: string;
    actionClicked: string;
    timestamp: string;
    fileUploaded?: string;
  }
}

Example Backend Response

{
  "success": true,
  "data": {
    "_id": "68a16fed4fc91007bd28ff9f",
    "appId": "jakir-board",
    "screens": [ /* ... see your backend payload ... */ ],
    "createdAt": "2025-08-17T06:00:13.277Z",
    "updatedAt": "2025-08-17T06:00:13.277Z",
    "__v": 0
  }
}

Expo Compatibility

  • Works in Expo Managed workflow (iOS/Android)
  • No custom native modules beyond standard peer dependencies

Project Structure

src/
  index.ts
  Onboarding.tsx
  screens/
    TextScreen.tsx
    FileUploadScreen.tsx
    BannerScreen.tsx
  utils/
    api.ts
    cache.ts
    types.ts
assets/config/fakeDB.json

Notes

  • Ensure your app installs the peer dependencies listed above
  • baseUrl can be omitted for production if your SDK bundles a default; override for local development
  • Data is logged to the console on finish and returned via onFinish

License

ISC