React chat component library
Usage
-
Import the library using, import chat from "cerah-chat"
-
Initialize the library with the following, chat.init(userSession, channel_name, history, log);
Here,
- userSession is the session object
- channel_name is either 'customer_service'/'teachers_forum'
- history is the history object
- log is the logger object
- Create an Object for chat api to login. const chatApi = chat.chatApi; chatApi.login();
This is will use the userSession to login the user into rocket chat.
- Pass the react component in tab navigator as, component={chat.Chat} in Tab.screen's component property