I’ve wanted more compact syntax for rendering #ViewComponent in #Rails and finally got around to making a proof-of-concept.
Before:
<%= render Admin::HeadingComponent.new(“Hi”) %>
After:
<%= c.heading “Hi” %>
Inspired by the `tag.strong “Hi”` Rails tag proxy.
Curious if others do anything similar!
https://gist.github.com/henrik/d053195e891b08e13c35338a82927f0a