Ask A Question


You’re not receiving notifications from this thread.

Components with Phlex in Rails Discussion

I feel like components in Ruby are super duper handy for arguments and other complex helper methods. Phlex takes it a step further with the HTML helper methods so you don't even really have to leave Ruby while you're coding. Pretty cool stuff!


I love Phlex. I've added it our work codebase, starting with our email templates. Massive improvements!
Also used it in a few side projects at home, but I am not sure where to put the javascript?


How do components work with turbo frames and streams?


No different than html.erb views. Both just generate the HTML independently of the JavaScript.


Great intro to Phlex. Now I need to work out if I like it more than ViewComponents, and if I want to switch :)


Agreed, I've already migrated some views to ViewComponent, and now I'm at a crossroads.


Thanks, Adam, great intro to Phlex! I appreciate how you took one step at a time -- including the errors -- and didn't try to polish too much beforehand, letting us work through and fix the problems with you.


Я хочу переписать view на phlex, как быть с partial ? а как выводить collections ? я не понял принцип . Help

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 81,149+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.