Skip to main content
Using React UI Kit, you can integrate your Next.js application with CometChat.

Pre-requisites

First, if not already installed, add React and React DOM from your terminal using the following command.

Install CometChat SDK

use the following command

Include React UI Kit

  • Copy the cloned repository to your root folder
  • Copy all the dependencies from package.json into your project’s package.js and install them

Build Chat component

Create chat.js file in your pages folder with the following code

Replace APP_ID, REGION, and AUTH_KEY with your CometChat App ID and Region in the below code.

Create consts.js file with ComeChat details

Build CometChatNoSSR component in your pages folder