DEV Community


Discussion on: How to create a simple and beautiful chat with MongoDB, Express, React and Node.js (MERN stack)

jeffsoriano profile image
Jeff Soriano

Can you please explain why you use socket.broadcast.emit for your 'push' event? It seems like socket.emit would work just fine but it doesn't. I've read this cheat sheet and it doesn't seem to explain why it wouldn't work:

armelpingault profile image
Armel Author

Hi Jeff, you might be right, I didn't test it with socket.emit, but it could be a mistake on my side ;)