DEV Community

Discussion on: Build a chat app with Twilio and KendoReact

Collapse
enriquemorenotent profile image
Enrique Moreno Tent

Cool article, well written and complete, even though for some reason I have not managed to build it using react hooks.

Collapse
philnash profile image
Phil Nash Author

This is a good point, I intend to update this with hooks at some point too. What's going wrong with hooks for you at the moment?

Collapse
enriquemorenotent profile image
Enrique Moreno Tent

For some reason, when "messageAdded" executes, the "messages" state appears as an empty array, making all the previous chat history disappear whenever I type a new message.

Could it be that ChatUI mutates the array? I have no idea why that happens. I spent hours trying to find out, but I couldnt.

Collapse
enriquemorenotent profile image
Enrique Moreno Tent • Edited on

Here is my component ChatApp written with hooks

pastebin.com/uVekpL41

Thread Thread
philnash profile image
Phil Nash Author

I'll try to have a play with this today. The ChatUI really shouldn't mutate the array. Will see what I can find.