react live chat widget

Solutions on MaxInterview for react live chat widget by the best coders in the world

showing results for - "react live chat widget"
Luna
13 Jun 2016
1import React from 'react';import { Widget, addResponseMessage } from 'react-chat-widget'import 'react-chat-widget/lib/styles.css'function App({  useEffect(() => {    addResponseMessage('Welcome to this awesome chat!');  }, []);   const handleNewUserMessage = (newMessage) => {    console.log(`New message incoming! ${newMessage}`);    // Now send the message throught the backend API    addResponseMessage(response);  };   return (    <div className="App">      <Widget        handleNewUserMessage={handleNewUserMessage}      />    </div>  );} export default App;