I have a react app receiving data every 5 seconds. The server handles it fine, but if you leave the page and come back or wait ~10 seconds, the page will turn white and become unresponsive.
The data contains information for the app to update and display.
I've tried using an async function to process the data, but that doesn't help
socketio client code:
socket.on('UpdateGames', data => {
const {j, s, e} = JSON.parse(data)
setJoin(j.map(item => new Game(item)))
setSpec(s.map(item => new Game(item)))
setEnd(e.map(item => new Game(item)))
})
Edit: tried sending data every 10 seconds, but the same thing happens