DEV Community

Farzana Pomy
Farzana Pomy

Posted on

Let's Explore React-Chat-Engine

Basically Chat Engine is a free serverless chat API.In this blog we will learn how to use this amazing Chat Engine is a free chat API. have three steps and take about five minutes…

To build this api first we need to build a ear with
Let's build a react-project

npx create-react-app chat-engine-tutorial
cd chat-engine-tutorial
yarn run start

if you run this code then congratulations you

The next step is :
This next step doesn’t need code.
Let’s go to Chat Engine and get our chat API key.
Register at chatengine.io
Create a Project, I’ll call mine “Tutorial”
Create your first User or two, I’ll call my users “Adam” and “Eve”
You’ll need the Public Key and the Username + Password of a user

The last step is Add the Chat API:
Let’s connect this chat API to your React project.
Take your favourite IDE and open the chat-engine-tutorial project.
Open the src/App.js file, and replace it with the following code:

import React from 'react';
import { ChatEngine } from 'react-chat-engine';
function App() {
return (
<ChatEngine
publicKey='00000000-0000-0000-0000-000000000000'
userName='adam'
userPassword='pass1234'
/>
);
}
export default App;

Lastly you can customize your application with reading this article Go Doc

Top comments (0)