shinobiseb / chat-messenger-momo-NEXTJS

A Simple Messenger App
https://chat-messenger-momo-nextjs.vercel.app
0 stars 0 forks source link

Implement websockets #1

Open shinobiseb opened 3 days ago

shinobiseb commented 3 days ago

Key Concepts for Real-Time Chat Updates

WebSocket Communication

Setting Up a WebSocket Server

Database Change Tracking

Client-Side WebSocket Connection

Handling Incoming Messages

Sending Messages

shinobiseb commented 3 days ago

Sockets and refetch function work however client side "socket.onmessage" is only being fired when a user sends a message

The intended function is for whenever a refetch message is sent via websocket, the client will fetchMessagesFromChat.

Need to refactor logic within server likely

shinobiseb commented 3 days ago

Also, need to find a way to implement watch.ts still (watchMessages()) for better performance likely