@toppr-engg/chat v1.1.29-alpha.0
Chat
This is a React library which can be used for chat functionality
To install the package, run the following command in the terminal
npm install @toppr-engg/chat
or
yarn add @toppr-engg/chat
Install the Peer Dependencies in your project
yarn add react react-dom react-redux redux redux-saga
import Chat from '@toppr-engg/chat'
function App() {
return (
<Chat
clientId={clientId} //required --> string
token={token} //required --> string
apiBaseUrl={apiBaseUrl} //optional --> string
onCloseChatCallback={onCloseChatCallback} // optional --> function --> To handle event related to close of Ask Expert
sessionId={sessionId} // required --> integer --> To initialise the chat with a particular session
isTutor={isTutor} // optional --> boolean --> To initialise the chat according to the UI and events for tutor or student
showChat={showChat} // optional --> boolean --> to toggle visibility of chat without unmounting it so as to listen to receive message event (get unread count)
onGetUnreadCountCallback={onGetUnreadCountCallback} // optional --> function --> to get the unread message count whenever a new message is recieved
/>
)
}
clientId and token are to be generated by tenant app
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago