TIL how to capture all the output of a block when doing your own slot like API for #ViewComponent
The trick is to use `viewcontext.capture(data_to_yield, &some_block)`
https://github.com/RolandStuder/til/blob/master/view_component/capture_a_block.md
Ever since using the elegance and simplicity of #Phlex I have been wondering, if I can't reach some of that expressiveness with #ViewComponent : https://rstuder.ch/2023-calling-view-component-instance-methods/
Thoughts on having ActiveRecord queries within a ViewComponent? I've got a sidebar component that's used in several controllers, but not the whole app, and need to load some data for it. I feel like I'm re-inventing React "smart" vs "dumb" components... #ruby #viewcomponent
This blog post about #rubyonrails Turbo Streams + #viewcomponent by @jasonyork was helpful to me! It demonstrates how all of the pieces fit together and includes recent changes as of #hotwire turbo-rails 1.4.0 to help rendering, introduced by @joeldrapper
https://predicatemethod.com/posts/using-viewcomponents-with-turbo/
#rubyonrails #ViewComponent #hotwire
Congrats to the #ViewComponent team for releasing 3.0 today. 👏👏👏 https://github.com/ViewComponent/view_component/releases/tag/v3.0.0
Turbo Rails 1.4 was released a few days ago with my PR, which means you can now render #Phlex or #ViewComponent components as turbo stream content. 🎉
https://github.com/hotwired/turbo-rails/releases/tag/v1.4.0
Exciting times for ViewComponent!
#ViewComponent v3 release candidate is available for testing
https://github.com/ViewComponent/view_component/releases/tag/v3.0.0.rc1
#Lookbook v2 beta is just out, including preview embeds, support for #Phlex components and ActionView partials, and a completely rewritten file watching/live updates system!
https://github.com/ViewComponent/lookbook/discussions/310
And ViewComponent::Form has an updated roadmap to v1
https://github.com/pantographe/view_component-form/issues/5
We'd love to have your feedback on this!
#ViewComponent #lookbook #phlex
@stevediaconou mind contributing this to the (work in progress) #ViewComponent Cookbook?
https://github.com/ViewComponent/view_component/discussions/1621
It's about time I get rid of legacy #coffeescript & #jquery that has been weighting me down for years. Going with #importmap + #stimulus + #viewcomponent @evilmartians is helping as usual https://evilmartians.com/chronicles/viewcomponent-in-the-wild-supercharging-your-components
#coffeescript #jquery #importmap #stimulus #ViewComponent
I’m really glad I didn’t go all-in on #Rails like #ViewComponent when writing #Phlex. There’s no dependency on Rails at all — we have our own helpers, our own #i18n integration, our own output buffer, etc. I’m excited to build adapters for Hanami and others.
#rails #ViewComponent #phlex #i18n
Wooo! #ViewComponent::Base.with_collection now supports Components with splatted keyword args: https://github.com/ViewComponent/view_component/pull/1560
Glad to do my part to help the #OpenSource #Ruby ecosystem; especially on such lovely tools!
#ruby #opensource #ViewComponent
We did so much!
1. Kelly and I worked on making Marketplace's Products editable: https://github.com/zinc-collective/convene/pull/942
2. And @anaulin added our first #ViewComponent: https://github.com/zinc-collective/convene/pull/943
We do this every week from 5PM to 7PM PT; and we focus on building #RubyOnRails, #Tailwind, #RSpec, and #Ruby fluency while creating community-owned tools for the #Cooperative and #SolidarityEconomy
#solidarityeconomy #cooperative #ruby #rspec #tailwind #rubyonrails #ViewComponent
Patch in to #ViewComponent so CI will pass: https://github.com/ViewComponent/view_component/pull/1576
So that it can support splatted keyword args: https://github.com/ViewComponent/view_component/pull/1560
It's nice to have the spaciousness in my schedule to make small fixes!