Closed tynanford closed 1 year ago
Also the updated logic here fixes two other issues:
Web socket data sticking around since the clear message and clearing the pvValues array happened before all the WS messages were done coming in https://github.com/ChannelFinder/pvinfo/issues/20
Also now if USE_PVWS is false in the .env, there should be no attempts to create a web socket connection and no checkboxes in the query results table
Found that placing each value update in it's own child component significantly improves the web socket load times and the overall performance of the app.
Using the pattern described here in option 3 to share a single web socket connection and filter the incoming messages in each child component https://github.com/robtaussig/react-use-websocket/issues/40#issuecomment-616676102
Still some warnings in the react app about slow loading setInterval, message, setTimeout, etc but overall the app is fine from a user perspective now on the dev server