HelpHub

Components Visuals

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:

npm install @questlabs/react-native-sdk

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

To integrate the HelpHub component into your React native application, follow these steps

  • Import the HelpHub Component: Import the HelpHub component from the @questlabs/react-sdk package.

  • Import the QuestProvider Component: Import the QuestProvider component from the @questlabs/react-sdk package.

import { QuestProvider,HelpHub} from '@questlabs/react-sdk';
  • Pass the Required Props: Pass the required props to the QuestProvider. The required props are apiKey, apiSecret, and entityId. and required props for the HelpHub component are userId, questId, token.

Props of HelpHub Component

The HelpHub styleConfig component accepts the following props

Home

Chat

Help

Update

Tasks

Example Usage

import { Button, Text, SafeAreaView, StyleSheet } from "react-native";
import React, { useState } from "react";
import {HelpHub,QuestProvider} from "@questlabs/react-native-sdk";
export default function App() {
  return (
    <SafeAreaView style={styles.container}>
     <QuestProvider
        apiKey="Your-Api-Key"
        apiSecret="Your-Api-Secret"
         entityId="Your-Entity-id"
         >
        <HelpHub
        questId=""
        token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1LWM5YmM3ZWEyLTE1NTgtNDg4OC05NmIxLWY3YWZkZmU2OTZkMSIsImlhdCI6MTcxMjA1OTk4MywiZXhwIjoxNzEyNjY0NzgzfQ.iz6CMwk8NSb07--IZC6_RNAJS5LVRnhA-6Z-Xm9EmEY"
        userId="u-c9bc7ea2-1558-4888-96b1-f7afdfe696d1"
     </QuestProvider>
    
    </SafeAreaView>
  );
}
const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: "lightgray",
    padding: 10,
    justifyContent: "center",
    alignItems: "center",
  },
});

Demo

Last updated