Share With friends
Last updated
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 useShareWithFriend
component into your React native application, follow these steps.
Import useShareWithFriend Hook: Import the useShareWithFriend
component from the @questlabs/react-sdk
package.
Import the ShareWithFriend Component: Import the ShareWithFriend component from the @questlabs/react-sdk
package.
Pass the Required Props: Pass the required props to the useShareWithFriend
. 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 useShareWithFriend Hook in same file
The ShareWithFriend component accepts the following props
header
string
Optional
Component Header Text.
headerDescrption
string
Optional
Component Header Description Text.
referralLink
string
Require
referral link text
title
string
Optional
Title Text main view
description
string
Optional
Description Text Main View.
buttonText
string
Optional
Send Button Text.
mainViewStyle
ViewStyle
optional
Main View style
headerTextStyle
TextStyle
optional
Header Text style
descriptionTextStyle
TextStyle
optional
description text style
codeViewStyle
ViewStyle
optional
Input box view style
codeTextStyle
TextStyle
optional
input box text style
inviteButtonViewStyle
ViewStyle
optional
button view style
buttonTextStyle
TextStyle
optional
button text style
headingText
TextStyle
optional
Outter heading text style
detailText
TextStyle
optional
outter detail text style
middalView
ViewStyle
optional
MIddal view style
App.js
DemoComponent.tsx