/react-native-chat-app

React Native Open-source Chat App (Includes 100% Ready UI)

Primary LanguageJavaScript



CometChat React Native app (built using CometChat Pro Java Script SDK) is a text messaging app capable of one-on-one (private) and group messaging.

Platform Platform

Table of Contents

  1. Installation

  2. Run the Sample App

  3. Screenshots

  4. Contribute

Installtion

Simply Clone the project from cometchat-pro-react-native-sampe-app repository and open in Text Editor of choice. To run the React Native App you need to have react native setup on your system. To setup react native you can follow the Installation guide at the follwing link React Native Setup.

Make CometChat Pro JavaScript SDK Compatilbe with React Native

We have injected two components from sample app to make Java script SDK compatible with React Native the components are as follows: 1] DOMParser 2] base-64 encode and decode

This is done in LoginScreen.js file in src folder. Here base-64 can be injected globally but DomParser needs to be injected only after CometChat.init().

Run the Sample App

To Run to sample App you have to do the following changes by Adding apiKey and appID

  • Open the Project App

  • Go to Under src --> LoginScreen.js

  • modify appID and apiKey with your own ApiKey and AppId

    let appID = "XXXXXXXXX" ,apiKey = "XXXXXXXXX";

Note

You can Obtain your APP_ID and API_KEY from CometChat Pro Dashboard

For more information read CometChat Pro JavaScript SDK Documentation

Contribute

Feel free to make Pull Request.