3 ms·
I’d add you don’t even need ViewComponent. Layouts, partials, variants, and helper functions provide plenty of heavy lifting options when it comes to refactorin
by inopinatus 4y ago
I’d add you don’t even need ViewComponent. Layouts, partials, variants, and helper functions provide plenty of heavy lifting options when it comes to refactoring your HTML.
My take on ViewComponent: it’s what helper functions become when they grow up into proper objects. Great for larger projects, may be more infrastructure than necessary for smaller ones, adopt incrementally when they seem compelling.
- aaronbrethorst 4y agoDon't need it, but I've found ViewComponent to be a big win over partials. Being explicit with the available state instead of implicit has helped me catch plenty of bugs.