Saturday 28 September 2019

Best practices when using React (hooks), Socket.io and Express for my app (NOT a chatroom app)?

I'm building an app that is NOT an online chatroom with Socket.io.Now It's just basically a JSON file that has to be in sync with all connected clients, everyone can edit the file and broadcast it to others. The file is stored locally and is re-written each time it's updated.How the hell do I initialise a connected client with the current file (both if the server goes down and up, and when clients join for the first time)Also what is the best way to keep track of socket.connected within my context provider?I'm sorry if this is poorly written but I have literally read every single article online and the doc's like a hundred times and I'm always ending up with some weird code that doesn't work.

Submitted September 29, 2019 at 04:02AM by Crispy_Kleina

No comments:

Post a Comment