I am thinking about server-side rendering again... Because it irks me that we have ruby/haml templates for the public pages of profiles/toots, and JSX templates for non-public profiles/toots in the web UI, when they largerly ought to look and behave the same. SSR in Rails is a pretty arcane topic though. Send help

@Gargron obviously the answer is to use IPC so you can send things to a node js process which will then render them server-side and send them back to rails whenever you need a thing to render
(dont actually do this)

Follow

@Gargron i forgot we were talking about node js which means *of course someone did the stupid thing*

@boots From a devops perspective, I don't want to force folks to setup a yet-another-process next to Puma and Streaming. However: I don't know if that mightn't be more performant than using ExecJS. In either case, the results of the prerender should be heavily cacheable...

@er1n Yep I've read through this. I will experiment with react_on_rails, I was actually using react-rails at the start of the project, but switched away because it was too coupled to Sprockets/having JS dependencies wrapped in Ruby gems, in favour of using Webpack and NPM/Yarn. But perhaps the SSR part could be used without anything else? Iunno

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!