react-simple-chatbot
react-simple-chatbot copied to clipboard
How to call handleEnd callback before the end flag is set to true
Describe the problem I want to make a bot that answers to computer science related questions. For prepared questions like What is a variable? ,I've use the options button and offered diffrent answers. But I offer the posibility to the user to ask the bot a questions. My problem is following after the user enters the questions I set the end flag true and thus my data is send from chatBot to ThemedProvider and then to Root Component where I do a select some words from it and reply with an video from my database. After that the I can't ask anymore questions or enter anything (because the end flag it is set to true).
The Question Can I trigger the handleEnd callback before end flag, or is it any other way in which can i send state from chatbot to parent components ?
I believe you can do some similar to this example
I believe you can do some similar to this example
In that exemple it is done inside the chatbot component. I need the values outside the chatbot.
Here is a exemple of my exemple. (it works only once because after that I set the end to true)
I believe you can do some similar to this example
In that exemple it is done inside the chatbot component. I need the values outside the chatbot. Here is a exemple of my exemple. (it works only once because after that I set the end to true)
Hey can you share your Project. I searching exactly this solution for my homework.