I either do SSR with slim or do API only with a separate frontend.
Rails changed direction too many times trying to do JS (coffee script, asset precompiling, webpack, etc)
I either do SSR with slim or do API only with a separate frontend.
Rails changed direction too many times trying to do JS (coffee script, asset precompiling, webpack, etc)
Rails 5 & 6 were rough, you forgot yarn! That was my biggest pain point. I still have Coffeescript code, we have been slowly converting as needed.
Rails 7 has been a lot better to deal with, we use vanilla JavaScript (outside the coffeescript lol). Makes it pretty easy tbh. We load partials as needed (via js) and the site is fast and light.
My recommendation is to stick close to html with rails or as mentioned, a separate front end. What we have works super well for us, but definitely custom
There's also SSR with react and other js frameworks, but I don't think that's what they meant.
n.b., I've been building Rails apps since 2007. I was a diehard Haml user up until about 2021 when I made an all-in bet on Tailwind and had to switch back to ERB because Haml with Tailwind felt too obtuse.
The only downside is I am now spoiled.
You can of course just drop to `markdown:`.
Still, I use it where I can on personal stuff, but tend to opt for Erb when collaboration with others is needed.