3 ms·
I've been using view_components for a while, and there's no going back for me. Much easier to organise views and keep them modular and easy to change and reuse.
by sudhirj 5y ago
I've been using view_components for a while, and there's no going back for me. Much easier to organise views and keep them modular and easy to change and reuse. Only thing I haven't figured out yet is refactoring, how to organise a large number of views into folders / modules without having to move tons of files manually or script it.
Tailwind is pretty useful as well, but definitely needs a component system like this, or an application of the Atomic Design principles to not have to repeat your styles hundreds of times all over the place.
- finniananderson 5y agoAre you using the sidecar setup?
- sudhirj 5y agoNope. Does the sidecar create a folder for each component?
- finniananderson 5y agoYep. It's "experimental" but stable. It creates the .rb file at the root and then you can put the template, CSS & JS in a subfolder. `bin/rails g component Button --sidecar`