Open justin808 opened 4 years ago
I would like to see a proper node renderer for react-rails. For my own project's SSR engine, I've forked https://github.com/jhawthorn/execjs-fastnode (which runs node as an external process but doesn't launch a new process on each render like the default exec-js node renderer) and added some more error handling / logging / integration with react-rails, but I would certainly welcome a more supported node runtime rather than the one I hacked together 😝.
Generally I've seen way better performance using miniracer than NodeJS as an ExecJS backend. I'd be curious to see a benchmark for using NodeJS direct rather than ExecJS as I'm unclear what effect that would have. I'd imagine it would be more similar to when you run the webpack dev server.
Primarily I suspect 1 and 5 would be the most interesting use cases for other folks as some issues are because people coming from pure Node don't have clear paths to making things compatible. 2 and 3 are less interesting I think as I've never personally had issues with memory even on larger deployments of React-Rails.
If you're willing to put in the work it could be interesting.
Generally I've seen way better performance using miniracer than NodeJS as an ExecJS backend.
@BookOfGreg do you remember where you saw such stats?
I've had a proper node renderer for quite some time for React on Rails Pro.
It's becoming increasingly useful to use NodeJS and not ExecJS for server-side rendering. Here are a few reasons:
node
(and notweb
). I suspect many other libraries are the same in this regard.If there was sufficient interest, I could look into a port of the renderer that worked for react-rails.