You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.
I personally would be happy with some render(ComponentClass) syntactic sugar, but it seems to me the most Railsy thing to do would be that the formal method be render(component: ComponentClass) in line with the :partial, :template, :inline, :file, :plain, :html, and :body options.
The text was updated successfully, but these errors were encountered:
Good point! This is something we recently considered internally, but decided to wait on until we try to upstream. I wouldn't be surprised if this ended up being the syntax we go with 😄
Rails 6.1.0.alpha now supports passing an object as the first argument to render: rails/rails#36388.
I've updated this repository and the gem to work with this syntax, passing an instance of the component in.
I actually think the component: syntax is a nicer way to go here, if not a bit verbose. I'm guessing this will come up on rails/rails as we move towards upstreaming the gem for 6.1.
I personally would be happy with some
render(ComponentClass)
syntactic sugar, but it seems to me the most Railsy thing to do would be that the formal method berender(component: ComponentClass)
in line with the:partial
,:template
,:inline
,:file
,:plain
,:html
, and:body
options.The text was updated successfully, but these errors were encountered: