1.0.8 • Published 2 years ago

cerah-chat v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

React chat component library

Usage

  1. Import the library using, import chat from "cerah-chat"

  2. 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
  1. 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.

  2. Pass the react component in tab navigator as, component={chat.Chat} in Tab.screen's component property