This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Widget, addResponseMessage, addLinkSnippet, addUserMessage } from 'react-chat-widget'; | |
import logo from './logo.svg'; | |
class App extends Component { | |
componentDidMount() { | |
addResponseMessage("Welcome to this awesome chat!"); | |
} | |
handleNewUserMessage = (newMessage) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Widget } from 'react-chat-widget'; | |
class App extends Component { | |
handleNewUserMessage = (newMessage) => { | |
console.log(`New message incomig! ${newMessage}`); | |
// Now send the message throught the backend API | |
} | |
render() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Widget } from 'react-chat-widget'; | |
class App extends Component { | |
render() { | |
return ( | |
<div className="App"> | |
<Widget /> | |
</div> | |
); |
NewerOlder