Get Started Component
The GetStarted component is a part of the Quest Labs React SDK. It provides a quick start guide for users to explore and engage with Application.
Components Visuals
To unlock early access to the component Get Access
Installation
To install the Quest react-native-sdk
into your project, follow these steps:
Open your terminal/command prompt.
Navigate to your project's root directory using the
cd
command if you're not already there.Run the following command to install the
quest-sdk
package using npm:
This command will download and install the package and its dependencies into your project.
Make sure your project has npm and Node.js installed, and that you have the necessary permissions to install packages in your project directory.
Usage
Root Component
Import the QuestProvider Component: Import the
QuestProvider
component from the@questlabs/react-sdk
package.
Pass the Required Props: Pass the required props to the
QuestProvider
. The required props areapiKey
,apiSecret
,entityId
andauthenticationToken.
Component Usage
To integrate the GetStarted
component into your React native application, follow these steps.
Import useGetStarted Hook: Import the
useGetStarted
component from the@questlabs/react-sdk
package.Import the GetStarted Component: Import the
GetStarted
component from the@questlabs/react-sdk
package.Pass the Required Props: Pass the required props to the
useGetStarted
. The required props arequestId
,questUserId
, anduserToken
or if user don't have quest User id then they can pass own userId to get questUserId and Token.
Don't not use QuestProvider and useGetStarted Hook in same file.
Props of GetStarted Component
The GetStarted component accepts the following props.
Props Name | Type | Require | Details |
---|---|---|---|
questId | string | optional | ID of the Quest. |
questUserId | string | optional | User ID for authentication. |
userToken | string | optional | Authentication token. |
campaignVariationId | string | optional | Id For verification. |
showDetailed | boolean | optional | show detaile mode. |
onClose | Function | optional | Create the function for onClose. |
isModal | boolean | optional | Open as Modal. |
actions | ICriteria[] | Require | in offline user need to provide the require filed data. |
loading | boolean | optional | don't use in offline mode. |
title | string | Require | Component title. |
description | string | Require | Component Descroption. |
onClick | Funtion | optional | when it offline the create own Funtion. |
isOffline | boolean | optional | for verification. |
onError | Function | optional | For Showing the Error. |
showProgressBar | boolean | optional | User Want to show progressBar or not |
showFooter | boolean | optional | user Want to show the footer or not |
ButtonType | "Buttons" | "Arrow" | optional | Want kind of button user want. |
styleConfig | object | optional | An object containing Styling properties for styling various components within the get started process, including form, topbar, headings, descriptions, and buttons. |
Style Props
Example Usage
App.js
DemoComponent.tsx
Demo
Last updated