Open Montana opened 2 years ago
You should look into rendering in isolated contexts, either with Node's built in VM or a library like VM2 (https://github.com/patriksimek/vm2)
That will let you render multiple requests concurrently without any issues like the above.
Hey folks,
I'm running server-side render of the React application. I'm using express for this purposes. The whole server-side render code looks like this:
I feel like this happens because of
react-helmet
uses static fields, I suppose. So, if two requests are being handled in parallel, this fields are being changed chaotically. I looked into thethread-safe
issue via: https://github.com/openameba/react-safety-helmet. Still no luck.Cheers, Montana Mendy