App ID
, AuthKey
, and Region
of your CometChat application when initializing the UI Kit.
i. Register on CometChat
Create a project
Add Dependency
Initialize CometChat UI Kit
UIKitSettings
Class. It is intended for use primarily during proof-of-concept (POC) development or in the early stages of application development. You can use the Auth Token method to log in securely.Login User
UID
. You can create your own users on the CometChat Dashboard or via API. We have pre-generated test users: cometchat-uid-1
, cometchat-uid-2
, cometchat-uid-3
, cometchat-uid-4
, cometchat-uid-5
.The Login method returns the User object containing all the information of the logged-in user.Render Conversations
App.js
file:App.scss
file located in the /src
folder to import CometChat UI Kit’s CSS file.Run the project
Tabs
component which will render the different tabs and on change we can render different components. Create a folder CometChatTabs
in src
folder. And add the below code,
Sidebar
component which will render the different components(Conversations, Users, Groups, Calls). Create a folder CometChatSelector
in the src
folder. And add the below code,
App.tsx
& App.css
files to import these new components as below,