Articles on: Crisp Inbox

How do I use Crisp with ReactJS

Articles on: Crisp Inbox


Installing Crisp with React is very easy. Here is the solution

  • Create an account on Crisp.

  • Go to Settings. Then, Website Settings.

  • Next to your website, click on Settings.

  • Click on Setup instructions.

  • Click on Chatbox setup instructions.

  • Select HTML.

  • Copy the JavaScript code

  • Install Crisp in your React project:


undefined npm install crisp-sdk-web


  • Go to your React codebase and update the main component.


import React, { Component } from "react"; import { Crisp } from "crisp-sdk-web"; class App extends Component { componentDidMount() { Crisp.configure("MY_CRISP_WEBSITE_ID"); } render() { return (

My Awesome App

); } } export default App;


Make sure to replace


CRISP_WEBSITE_ID


with yours. Otherwise, this will not work!


Using the Web SDK


The Crisp Web SDK offers many different options such as many loading, as well as setting user information.

You can find more information from your our documentation on https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/npm/


Updated on: 11/03/2024

Updated on: 19/07/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!