3 ms·
Have you use the whole Hotwire suite? It's much better than just Stimulus. Componentizing your views will also make it more modern.
by aledalgrande 4y ago
Have you use the whole Hotwire suite? It's much better than just Stimulus. Componentizing your views will also make it more modern.
- sickcodebruh 4y agoI have not, no. When you say “componentizing”, what does that entail? Is it the ViewComponents gem? If someone reading this has experience with both TS+React and modern Hotwire apps, you’d do the world a service by writing a blog about modern Rails views for the experienced React developer.
- aledalgrande 4y agoYeah what I'm suggesting is a React-y modular view codebase. You can use ViewComponents but I quickly found it was too limited for me and I didn't like to have many files for a single component. I just use Rails partials, the performance hit for my app is none. I also wrote a local VSCode plugin for snippets autocomplete so I can go faster. Also sprinkle some (rare) Stimulus and Turbo streams/frames. The one thing you're gonna be missing is typing, Sorbet does not work in views.