Using Composer component with ReactWebChat

62 Views Asked by At

I'm using ReactWebChat to enable bot feature for the site I'm working on. I would need to implement programmatic sending of text to bot and useSendMessage hook is presented on the examples as a way to do it. As documentation states, hooks only work from Composer children.

To enable Web Chat API, all UI components must be located under the Composer component. You can refer to our plain UI customization sample for details.

When I try to combine Composer and ReactWebChat I get error

botframework-webchat internal: <ActivityKeyerComposer> should not be nested.

ActivityKeyerComposer runs twice and on the second run an existing context is found as it has just been successfully created on the first run. This errors blocks the bot from connecting.

My question is: Can Composer and ReactWebChat can be used simultaneously? None of the examples on the site show these components working together. If it is possible, any examples would be very welcome.

0

There are 0 best solutions below