-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Futurize ViewComponents #36
Comments
@julianrubisch would you want to pair on this some? I'm not sure <%= futurize ItemCardComponent.new(card, arbitrary: :value), extends: :div do %>
<div class="spinner"></div>
<% end %> would be supportable for an API unless you have some ideas about how we could hook into the view_component's instantiation step to capture raw arguments to deep transform them down the wire. Something like the following could be workable: <%= futurize component: ItemCardComponent, collection: @cards, extends: :div do %>
<div class="spinner"></div>
<% end %> which would call <%= futurize @card, component: ItemCardComponent, extends: :div do %>
<div class="spinner"></div>
<% end %> which would call: I'm not sure the API we'd want to support for arbitrary parameters, maybe something like: <%= futurize component: ItemCardComponent, locals: [@card, yes: :no], extends: :div do %>
<div class="spinner"></div>
<% end %> which would call: I think we have to strike a balance between fully supporting ViewComponents while also making it easy to transmit down the wire lazily. This could be a little tricky. Also, as much as I'd like to be able to support something like: <%= futurize_component @cards, extends: :div do %>
<div class="spinner"></div>
<% end %> to generate a collection of components, ViewComponent/view_component#129 supported |
👍 ++ For this feature. I'd love to see ViewComponent support. I'm just discovering this library in tandem with adopting components. |
Feature Request
Make futurism VC-proof
Is your feature request related to a problem?
It would be nice to be able to futurize VC just like partials.
The text was updated successfully, but these errors were encountered: