ViewComponent gem

It is a framework for building view components in Ruby on Rails.


Ruby objects that output HTML.


Benefit:


Unit-tested

Cheaper


Quick start


bin/rails generate component Example title content


also support others template engines such as erb, haml, and slim.


bin/rails generate component Example title content --template-engine slim


View my example project here:

https://github.com/radinreth/view-component-rails