This sample app shows how to build a React Native chat application using CometChat Pro SDK.
SCREENSHOTS
Jump straight into the code or read the accompanying step-by-step guide here on our blog.
This demo uses:
- React Native
- CometChat Pro React Native SDK
- Download the repository here or run
git clone https://github.com/cometchat-pro-tutorials/react-native-chat.git
- In the
react-native-chat
directory, runnpm install
- You need to sign up for CometChat PRO and create your application first
- Create an ApiKey. You can use auth-only permission for this application
- Create a Group from the dashboard
- Create a
.env
file in the root folder of the project and paste the following content in it:
REACT_NATIVE_CC_APP_ID= YOUR_APP_ID
REACT_NATIVE_CC_API_KEY= YOUR_API_KEY
REACT_NATIVE_CC_GUID= YOUR_GROUP_GUID
Replace YOUR_API_KEY
, YOUR_APP_ID
and YOUR_GROUP_GUID
with your API KEY, APP ID and GUID as obtained from your CometChat dashboard.