What's the easiest way to add a live chat script?
I'm wondering what's the easiest way to provide a live chat via an external JS script across all of my app pages? Do I have to include it in App.tsx? π
2 Replies
Hi @mb23. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. However, I can tell you that Wasp provides a fully integrated WebSocket experience by utilizing Socket.IO on the client and server. This can be used to create a live chat feature in your application. You can use the
useSocket
and useSocketListener
hooks in your React components to handle WebSocket connections and events.
Here is an example of how you can use these hooks to create a chat page:
For more information, you can refer to the Wasp documentation on WebSockets (https://wasp-lang.dev/docs/advanced/web-sockets).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @mb23, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?Are you talking about a third party solution (like zendesk widgets and such)?