State update limitations dev vs. prod?

I’ve set up a MERN stack app using Render.com to host my backend as a web service, and my clientside as as static site.
I am managing some of the state with Websockets querying my server etc.

When I am running in local dev mode, everything works perfectly fine, and I see a state change immediately reflected in the DOM for one of my components.

When I run in production, I only see the the state updated if I manually refresh the page…

This seems strange since the code is exactly the same both in prod and in dev.
I tried forcing a re-render on my component and also implemented a reconnect strategy for the socket on the client side in case it’s something about that, but nothing seems to work.

Are there any limitations on state in prod vs. dev modes inherent in Render.com…?

DOM updates aren’t limited by Free vs Paid, because DOM updates are done via the browser. As long as the JS is delivered to the browser, the browser will execute it.

That said, the question is not Free vs Paid, Dev vs Prod, but why the browser didn’t receive the state update. Are there any errors in the console? WebSocket closure? .js file failed to load? Verify that the component parts of communication are functioning as intended before exploring a larger state change.

1 Like