adrianhajdin / project_chat_application

This is a code repository for the corresponding YouTube video. In this tutorial we are going to build and deploy a real time chat application. Covered topics: React.js, Node.js, Express.js, and Socket.io.
https://www.jsmastery.pro
3.98k stars 1.54k forks source link

Rendering messages twice #129

Open Lagnajit09 opened 7 months ago

Lagnajit09 commented 7 months ago

Hey... great video.... I checked the code line by line.... the difference is i created my react-app using vite@latest But i replaced my main.js where there was with your index.js The useEffects are the same as yours. Can you help me with this?

Screenshot 2024-02-26 012308 Each message i am sending is being sent twice.

leo-1228 commented 4 months ago

did you use socket or http ? This is the why you are getting this issue. let's discuss in more detail on telegram. this is my telegram @leo1228codeforce .

Lagnajit09 commented 4 months ago

Hey thanks for replying. I used socket for realtime-communication. Yeah It is fine to discuss it on telegram.