Re:An Overview of Ruby on Rails 7.1 Features. Part III
by siaw23 on Monday January 23, 2023 @04:39PM
(#34495451)
I believe you can do anything React can with Stimulus + Turbo these days. I don't do much FE but I've been tracking Hotwire for some time now.
[ Parent
| on HN ]
Re:An Overview of Ruby on Rails 7.1 Features. Part III
by sharps_xp on Monday January 23, 2023 @05:17PM
(#34495906)
perhaps for most things but probably not to the extent of something like excalidraw, which uses react
Re:An Overview of Ruby on Rails 7.1 Features. Part III
by splitrocket on Monday January 23, 2023 @05:24PM
(#34495966)
Yes, but in that case, you can use only the complexity where you need it, instead of globally.
Re:An Overview of Ruby on Rails 7.1 Features. Part III
by mokkol on Wednesday January 25, 2023 @02:44PM
(#34523168)
You can still use React or whatever on those pages. And for the rest (settings pages, signup pages and all the CRUD pages) you can use standard Rails with Hotwire.
Re:An Overview of Ruby on Rails 7.1 Features. Part III
by simpsond on Monday January 23, 2023 @06:24PM
(#34496565)
Yes, but there is a whole ecosystem of react components and react developers.
Re:An Overview of Ruby on Rails 7.1 Features. Part III
by jacobsenscott on Monday January 23, 2023 @06:37PM
(#34496731)
Maybe you can with heroic effort, but you shouldn't. You should build within the constraints of your tools. HW + Stimulus are great - good enough for what most web apps need to do. It gives you "traditional web app, with a bit of realtime updating" - which is the perfect fit for most web apps.
But you wouldn't want to use it for a fully interactive desktop style application with lots of interacting components.
Re:An Overview of Ruby on Rails 7.1 Features. Part III
by 0xblinq on Wednesday January 25, 2023 @02:20PM
(#34522878)
Agree. So unless you have a pretty big budget and you're building Google Maps or Figma you shouldn't use React.
Sadly, everyone things they have such a big budget and they're building the next Figma. Even if you're building a CRUD app. (I'm talking to you previous team of mine).
Re:An Overview of Ruby on Rails 7.1 Features. Part III
by jemmyw on Monday January 23, 2023 @07:55PM
(#34497532)
You can do anything with plain JS too, but that doesn't mean you'd want to. The problem with Hotwire is that you do often have the server round trip in there. That's fine most of the time, it just gets a little harder to understand as the complexity rises. That's not to knock it, I think Hotwire is pretty good.
Re:An Overview of Ruby on Rails 7.1 Features. Part III
by andrei_says_ on Monday January 23, 2023 @08:37PM
(#34497907)
In what scenario would complexity be higher in a simple UI - server loop? Doesn’t complexity usually arise from having additional logic in the browser and maintaining state separately?
Re:An Overview of Ruby on Rails 7.1 Features. Part III
by jemmyw on Tuesday January 24, 2023 @08:11PM
(#34513007)
I guess it depends somewhat on how you imagine up something and write it. I was working on some drag and drop UI that had multiple sortable lists and an action area. Figuring the server side and UI at the same time didn't work out. I reversed and implemented the UI with its required state, and then it was easy to transform that state to what the server side required, and vice versa.
Complexity is tricky. Are three simple things more complex than one thing thats harder to understand?