Survey Form
This Component is a versatile tool for collecting valuable insights and feedback from your target audience. Use this component to create customizable surveys and gather essential data.
Last updated
This Component is a versatile tool for collecting valuable insights and feedback from your target audience. Use this component to create customizable surveys and gather essential data.
Last updated
To unlock early access to the component Get Access
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.
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 are apiKey
, entityId,
authenticationToken
and fontFamily.
To load external fonts, please refer this doc to setup expo-font on your expo app.
To integrate the useSurvey
component into your React native application, follow these steps.
Import useSurvey Hook: Import the useSurvey
component from the @questlabs/react-sdk
package.
Import the SurveyForm Component: Import the SurveyForm
component from the @questlabs/react-sdk
package.
Pass the Required Props: Pass the required props to the useSurvey
. The required props are questId
, questUserId
, and questToken
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 useSurvey Hook in same file
The Gamified component accepts the following props
Props Name | Type | Require | Details |
---|---|---|---|
questId | string | Optional | Provied questId |
questUserId | string | Optional | Provied the userId |
userToken | string | Optional | Provied Quest Token |
loading | boolean | Optional | don't use in offline mode. |
campaignVariationId | string | Optional | Id For verification. |
onError | Function | Optional | For Showing the Error. |
actions | ICriteria | require | in offline user need to provide the require filed data. |
title | string | Optional | Component Header text. |
description | string | Optional | Component Description text. |
itemsPerPage | number | Optional | Number of pages at the time |
ratingType | "emoji" | "number" | "colored" | "star" | Optional | What kinfd of rating 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. |
App.js
DemoComponent.tsx