I touched briefly on Phlex in the video. If you want to go deeper, check out my guest lesson on GoRails: gorails.com/episodes/components-with-phlex-in-rails
Hello sir thnks for your videos i m struggling to choose between ruby on rails or java spring boot there is more more jobs in java so is rails worth taking risk for it ? Thnks
I prefer the standard Rails default erb default, controllers and action, not sure why I feel that this code is much more complex than the standard Rails default way.
It probably feels that way because it's familiar. The real power of Phlex is it removes any doubt about where code should go. It's just Ruby, so it's fully testable. If you need to share code between components or views, just use modules or inheritance. Helpers are just functions. There's less chance of nil instance variables crashing/breaking your page. And if you want a component library, Phlex shines compared to partials, because again it's just Ruby, and you can clearly see required and optional parameters, in a way that Rails partials are somewhat lacking. Highly encourage you to give it another chance