1.0.40 • Published 8 months ago

inspirex-onboarding-sdk v1.0.40

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

React Native Onboarding SDK

A flexible and customizable onboarding flow SDK for React Native applications.

Installation

npm install inspirex-onboarding-sdk
# or
yarn add inspirex-onboarding-sdk

Usage

  1. Import and initialize the SDK:
import sdk from 'inspirex-onboarding-sdk';

// Initialize the SDK
sdk.initialize('your-api-key');

// Set user information
sdk.setUser({
  id: 'user-123',
  name: 'John Doe',
  email: 'john.doe@example.com',
  properties: { plan: 'premium' }
});
  1. Start the flow and listen for events:
// Start the flow
sdk.startFlow();

// Listen for events
sdk.on('flowStart', (data) => {
  console.log('Flow started:', data.flowId);
});

sdk.on('flowComplete', (data) => {
  console.log('Flow completed:', data.flowId);
});

sdk.on('screenChange', (data) => {
  console.log('Screen changed:', data.screenId);
});
  1. Render the flow in your React Native app:
import React from 'react';
import sdk from 'inspirex-onboarding-sdk';

const FlowComponent = sdk.getFlowComponent();

export const App = () => {
  return (
    <>
      {/* Your app content */}
      <FlowComponent />
    </>
  );
};

Features

  • Fully customizable UI components
  • TypeScript support
  • Event-based architecture
  • Screen navigation
  • Modal-based presentation
  • Flexible styling options

API Reference

SDK Methods

  • initialize(apiKey: string): Initialize the SDK with your API key
  • setUser(user: User): Set the current user information
  • startFlow(): Start the onboarding flow
  • completeFlow(): Complete the current flow
  • getFlowComponent(): Get the React component to render the flow

Event Types

  • flowStart: Emitted when the flow starts
  • flowComplete: Emitted when the flow is completed
  • screenChange: Emitted when the screen changes

License

ISC

1.0.40

8 months ago

1.0.39

8 months ago

1.0.38

8 months ago

1.0.37

8 months ago

1.0.36

8 months ago

1.0.35

8 months ago

1.0.34

8 months ago

1.0.33

8 months ago

1.0.32

8 months ago

1.0.31

8 months ago

1.0.29

8 months ago

1.0.28

8 months ago

1.0.27

8 months ago

1.0.23

8 months ago

1.0.22

8 months ago

1.0.21

8 months ago

1.0.20

8 months ago

1.0.19

8 months ago

1.0.18

8 months ago

1.0.17

8 months ago

1.0.16

8 months ago

1.0.15

8 months ago

1.0.14

8 months ago

1.0.13

8 months ago

1.0.12

8 months ago

1.0.11

8 months ago

1.0.10

8 months ago

1.0.9

8 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago