Hacker News new | ask | show | jobs
by ecshafer 927 days ago
Rails with turbo and stimulus is amazing. Very similar to htmx and phoenix liveview. Stimulus lets you make a really minimal web framework for ui elements that are mostly defined as ruby components, and turbo lets you to use erb without whole page reloads. Whole responsive web apps with a dozen lines of js, its great.
1 comments

What do you mean by UI elements defined as ruby components? Are you referring to ViewComponents or something else?
Yeah you can define viewcomponents in ruby. Have them rendered based on stimulus code. Turbo lets you do updates without full page reloads, viewcomponents make much more reusable and flexible ruby based components than pure erb, and stimulus handles front end state. I rewrote a medium size react + graphql page with this and thr code base was literally 1/10th the size