Our great sponsors
-
view_component
A framework for building reusable, testable & encapsulated view components in Ruby on Rails.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
View components, via Github’s view_component gem, are growing in popularity in the Rails community but until recently, view components and Turbo Stream broadcasts didn’t play well together. This made using both view components and Turbo Streams in the same application clunky and a little frustrating.
View components, via Github’s view_component gem, are growing in popularity in the Rails community but until recently, view components and Turbo Stream broadcasts didn’t play well together. This made using both view components and Turbo Streams in the same application clunky and a little frustrating.
If you want to skip right to the end the complete code for this article can be found on Github.
This issue will be fixed in the next Rails release, but until then you can prevent the issue by updating development.rb with this line:
Related posts
- Have you been using ViewComponent. What advantages do you see in it?
- Green Vs. Brown Programming Languages ("Ruby is a better language now than it was then. Yet now it is dreaded. Part of the difference, it seems to me, is that now people have 14 years’ worth of rails apps to maintain.")
- Building lightweight components with Rails `helpers` and StimulusJS
- GitHub Incident with Issues, API Requests and Pull Requests
- Client side Git hooks 101