That's not a server side js issue. That's a React issue.
NodeJs on backend works perfectly fine and predictably.
With React things get a little confusing mainly because there is a huge ecosystem around react and everything can be another thing in different setups. (Like React Native vs NextJs vs React with Electron etc)
Once again tho, that is a react specific issue.