Hello,
I have just installed react-chat-widget and set it up correctly.
I can add messages to it using addResponseMessage and everything looks good.
BUT when I enter some text in the chat input and press 'enter' or click on the send button, nothing is happening. Nothing in the console as well, no errors or logs from the handleNewUserMessage callback.
I don't get it as it's the most basic feature.
import React, {useEffect} from "react";
import {addResponseMessage, Widget} from "react-chat-widget";
import "react-chat-widget/lib/styles.css";
function App() {
useEffect(() => {
addResponseMessage("Hello");
addResponseMessage("What would you like to do ?");
}, []);
const handleNewUserMessage = (newMessage) => {
console.log("New message incoming!", newMessage);
// Now send the message throught the backend API
addResponseMessage("ok");
};
return (
<div className="App">
<Widget
handleNewUserMessage={handleNewUserMessage}>
</div>
);
}
any help would be welcome, thanks