This repository is not maintained anymore.
React implementation for the messaging application Crisp
npm add react-crisp
or
yarn add react-crisp
/* Import the component */
import Crisp from 'react-crisp';
/* Insert the componenent */
<Crisp crispWebsiteId="the-website-id-given-by-crisp" />
<Crisp
crispWebsiteId="the-website-id-given-by-crisp" // Required
crispTokenId="a-unique-token-for-the-user"
attributes={{
"user:email": ["[email protected]"],
"user:nickname": ["foo42"],
}}
/>
For a complete list of attributes please see the Crisp's Docs.
<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.
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
/>
<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.