dharness / react-chat-window

Intercom-style live chat window written in react
The Unlicense
671 stars 250 forks source link

Can we use this real time? #126

Closed ko06 closed 5 years ago

ko06 commented 5 years ago

Is good to use react in chat view? because it takes so much time to render and more file size occur right? so why we go with react instead of vennila js? Can you explain some advantages please?

dharness commented 5 years ago

Regardless of whether or not react in itself is good (such discussion is widely available on the internet so I won't repeat it here), there are large numbers of people and companies using it. If you already use it, react-chat-window is a drop-in solution. If not, you'll need to consider something else.

ko06 commented 5 years ago

Can you please share any discussion thread on regarding this I am searching whole day! just for wondering Is intercom used React or something else in their chat app?

heatherbooker commented 5 years ago

Hi @ko06 , I'm not sure what Intercom uses in their chat app. Here's an example of a discussion of the pros and cons of react: https://www.quora.com/What-are-the-main-advantages-of-ReactJS-over-plain-JavaScript, I hope that answers your question.

We generally find react works well for us, that's why this package exists - you may prefer vanilla js, which is also totally valid, but we can't try to cover too many situations! :) So like @dharness said, you might have to look elsewhere on the web, or feel free to use the code found here for inspiration.

Thanks for your interest!

ko06 commented 5 years ago

Thanks for your reply. sounds good. between Intercom uses React only. is we can migrate this code to preact.js?

@FYI, Preact has better performance than react but only similar functionality. can you share any info regarding migration (here) convert this react to Preact

heatherbooker commented 5 years ago

It is probably possible to make a version by migrating it to preact, and/or at least re-create similar functionality in preact. I myself have never used it so I can't offer any advice, but I believe preact tries to make it an easy switch. We won't be changing the package to use preact, but feel free to play around on your end or maintain a preact fork!