home.social

#viewcomponent — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #viewcomponent, aggregated by home.social.

fetched live
  1. 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!

    gist.github.com/henrik/d053195

  2. 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!

    gist.github.com/henrik/d053195

  3. 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!

    gist.github.com/henrik/d053195

  4. 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!

    gist.github.com/henrik/d053195

  5. 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!

    gist.github.com/henrik/d053195

  6. ViewComponents reduce bloat, simplify data, and create reusable consistent frontend styling. Despite these benefits, they're often under-utilized in the Rails community. I've written a blog post outlining an overview of how they work by refactoring a real-world example into isolated ViewComponents.

    💎 Check it out 💎

    joshfrankel.me/blog/viewcompon

    #ruby #rails #viewcomponent

  7. ViewComponents reduce bloat, simplify data, and create reusable consistent frontend styling. Despite these benefits, they're often under-utilized in the Rails community. I've written a blog post outlining an overview of how they work by refactoring a real-world example into isolated ViewComponents.

    💎 Check it out 💎

    joshfrankel.me/blog/viewcompon

    #ruby #rails #viewcomponent

  8. ViewComponents reduce bloat, simplify data, and create reusable consistent frontend styling. Despite these benefits, they're often under-utilized in the Rails community. I've written a blog post outlining an overview of how they work by refactoring a real-world example into isolated ViewComponents.

    💎 Check it out 💎

    joshfrankel.me/blog/viewcompon

    #ruby #rails #viewcomponent

  9. ViewComponents reduce bloat, simplify data, and create reusable consistent frontend styling. Despite these benefits, they're often under-utilized in the Rails community. I've written a blog post outlining an overview of how they work by refactoring a real-world example into isolated ViewComponents.

    💎 Check it out 💎

    joshfrankel.me/blog/viewcompon

    #ruby #rails #viewcomponent

  10. 🤔 random thought—does DHH's recent "system tests are dead" proclamation open the door to ViewComponents (or Phlex, or ?) being stock Rails features? I like ViewComponents because I can test UI things without the browser overhead—even if I only use a component once in my whole app. #RubyOnRails #RSpec #ViewComponent #phlex

  11. 🤔 random thought—does DHH's recent "system tests are dead" proclamation open the door to ViewComponents (or Phlex, or ?) being stock Rails features? I like ViewComponents because I can test UI things without the browser overhead—even if I only use a component once in my whole app. #RubyOnRails #RSpec #ViewComponent #phlex

  12. 🤔 random thought—does DHH's recent "system tests are dead" proclamation open the door to ViewComponents (or Phlex, or ?) being stock Rails features? I like ViewComponents because I can test UI things without the browser overhead—even if I only use a component once in my whole app. #RubyOnRails #RSpec #ViewComponent #phlex

  13. 🤔 random thought—does DHH's recent "system tests are dead" proclamation open the door to ViewComponents (or Phlex, or ?) being stock Rails features? I like ViewComponents because I can test UI things without the browser overhead—even if I only use a component once in my whole app. #RubyOnRails #RSpec #ViewComponent #phlex

  14. 🤔 random thought—does DHH's recent "system tests are dead" proclamation open the door to ViewComponents (or Phlex, or ?) being stock Rails features? I like ViewComponents because I can test UI things without the browser overhead—even if I only use a component once in my whole app. #RubyOnRails #RSpec #ViewComponent #phlex

  15. 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)`

    github.com/RolandStuder/til/bl

  16. Ever since using the elegance and simplicity of #Phlex I have been wondering, if I can't reach some of that expressiveness with #ViewComponent : rstuder.ch/2023-calling-view-c

  17. 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

  18. 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

  19. 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

  20. 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

  21. Suchst Du frische Impulse für deine Projekte? ☕ Unser Kafi am 12. Juni ist die Lösung! Lerne, mit Rails deinen Code besser zu strukturieren 🛠️. Triff Gleichgesinnte in Bern 🏢 oder online 💻. 🚀

    puzzle.ch/de/blog/articles/202

  22. Suchst Du frische Impulse für deine #Ruby Projekte? ☕ Unser #Tech Kafi am 12. Juni ist die Lösung! Lerne, mit Rails #ViewComponent deinen Code besser zu strukturieren 🛠️. Triff Gleichgesinnte in Bern 🏢 oder online 💻. #Community 🚀

    puzzle.ch/de/blog/articles/202

  23. Suchst Du frische Impulse für deine #Ruby Projekte? ☕ Unser #Tech Kafi am 12. Juni ist die Lösung! Lerne, mit Rails #ViewComponent deinen Code besser zu strukturieren 🛠️. Triff Gleichgesinnte in Bern 🏢 oder online 💻. #Community 🚀

    puzzle.ch/de/blog/articles/202

  24. Suchst Du frische Impulse für deine #Ruby Projekte? ☕ Unser #Tech Kafi am 12. Juni ist die Lösung! Lerne, mit Rails #ViewComponent deinen Code besser zu strukturieren 🛠️. Triff Gleichgesinnte in Bern 🏢 oder online 💻. #Community 🚀

    puzzle.ch/de/blog/articles/202

  25. 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

    predicatemethod.com/posts/usin

  26. 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

    predicatemethod.com/posts/usin

  27. 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

    predicatemethod.com/posts/usin

  28. 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

    predicatemethod.com/posts/usin