🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

react-crisp

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-crisp

React component implementation of Crisp the messaging app

latest
Source
npmnpm
Version
0.1.4
Version published
Weekly downloads
57
42.5%
Maintainers
2
Weekly downloads
 
Created
Source

Mergify Status

React-Crisp

React implementation for the messaging application Crisp

Install

npm add react-crisp
or
yarn add react-crisp

Usage

/* Import the component */
import Crisp from 'react-crisp';

/* Insert the componenent */
<Crisp crispWebsiteId="the-website-id-given-by-crisp" />

Identify the user and assign attributes

<Crisp
    crispWebsiteId="the-website-id-given-by-crisp" // Required
    crispTokenId="a-unique-token-for-the-user"
    attributes={{
        "user:email": ["foo@bar.com"],
        "user:nickname": ["foo42"],
    }}
/>

For a complete list of attributes please see the Crisp's Docs.

Configuration

<Crisp
    crispWebsiteId="the-website-id-given-by-crisp" // Required
    crispTokenId="a-unique-token-for-the-user"
    configuration={{
        "position:reverse": [true],
    }}
/>

For a complete list of parameters please see the Crisp's Docs.

Safe mode

To prevent Crisp to emit errors when an exception occurs, you may enable the Safe Mode (see Crisp's Docs. With react-crisp it's done like this:

<Crisp
    crispWebsiteId="the-website-id-given-by-crisp" // Required
    safeMode
/>

Set CRISP_RUNTIME_CONFIG

<Crisp
    crispWebsiteId="the-website-id-given-by-crisp" // Required
    crispRuntimeConfig={{
      session_merge: true,
    }}
/>

For more details about the variable CRISP_RUNTIME_CONFIG see Crisp's Docs.

Keywords

React

FAQs

Package last updated on 06 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts