So I made another rant... 😅Not aimed at anyone who watches these videos, but I might have received one too made rude DMs because I made a React tutorial, and seen one too many bad Reddit takes recently lol. Don't cancel me pls.
Thanks for your contribution in Rails + React tutorials. Indeed, the market demand for Rails + React jobs is 10x higher than for Hotwire + Rails jobs. Thus, going all-in with React is a safer bet. Me personally, I love the Hotwire approach because it allows me to be much more productive as an solo developer working on a project. Whereas having React in small projects is overkill. In large projects it can make more sense. But again, if it's a project with 4+ devs, you can have a dedicate React person that has nothing to do with Rails, and the Rails devs can just be supplying API endpoints. So with that logic, it makes no sense for me as a Rails dev to invest my time into enhancing my React skills: I'd better be great at Ruby & Rails API.
Yeah I mean to each their own. I wouldn't expect someone to use React over Hotwire in the same way I don't expect them to use Hotwire over React. It's just an issue for me when people try to pass their opinions off as the optimal solution when some guy is just trying to get a job. Personally covering React and importmaps without JSX made me throw up a little, but that exact video was made because that solution was required for someone's take home interview. So I'm not a fan, but there's clearly demand so when people lose it on Reddit about not doing it the Rails way I'm like, come on man. The person is just trying to feed their family lol. I used to work in a job where pretty much every problem boiled down to doing it in a ridiculous suboptimal way, so I can appreciate that sometimes your hands are tied lol. I think the epitomy of this was a legacy application that had a literal two week setup process before we wrote some documentation on how to do it and found out you needed to comment out the tests to make it work. 🤡 I wouldn't advise commenting out tests, and yet that ended up being the solution for a solid 3 months 😭 As for the proper Rails way of doing things and Hotwire, I'll never hide that I'm not a Rails dev at heart. That's why I send people to you. 😂 I still get caught using findElementById in my stimulus controllers.
I'm a bit surprised inertiajs isn't talked about more in the rails community. It's basically glue between your server and frontend routing. You get nice routing and ability to just use frontend frameworks for what they excel at, but keep your data handling and state on your server.
The timeliness of this video is spot on for me. I have been tasked with re-writing a legacy Sinatra app in Rails 7. Our current apps all have React frontends (because our FE devs are React devs). Planning out this simple project brought up a lot of questions regarding maintainability for the team. Thank you for sharing your point of view and always being a great resource.
Hey man, I personally feel that rails as a backend api is the best use case for it. But following all the buzz around hotwire I gave it a try last week. It was quite easy to do stuff without touching frontend as what it claims to be but i don't know I just don't feel comfortable enough and I would still go with rails as an api and react in frontend for a project I know is going to be much more than an MVP. Yes hotwire and stimulus could be a savior when we are building a customized admin in rails. Either the whole community has to start using it or it will just remain as a thing as good to know.
Sounds like you need to give Unpoly a try. It can turn any server-side rendered page into an SPA and has a much simpler architecture and doesn't require you to change your backend at all.
RoR + Hotwire is perfect(from my pov) for 1 type of projects - internal systems/portals for enterprises that are not computation-heavy. It will give you fastest development speed, iterations, etc. Others - it's always a compromise, when you have to take into consideration product market and job market.
This wasn't the video I was looking for but I watched it completely because I highly relate to what you were saying. I'm finishing a degree which does not have a really good market in my country, so I decided to try programming and started on October of this year. If it is difficult for people to get a junior position just imagine how difficult it is for the ones who don't have a CS background. I know that in Tech it doesn't matter if you're studying a CS degree, but I heard that some platforms can potentially reject applicants if they don't fulfill that background requirement. So one must try to make their profile as marketable as posible, and I think react+rails should be the go way in doing a portfolio for a newbie trying to find their first job.
Guys if you are angry listen to this . Dean is just giving his honest view of this monopoly that guys in reddit do, and plus on that, the stack that I use for my startup is rails in the backend , integrated with graphql because I really love the separations of concern in rails you have models, mailers, resolvers , mutations etc... and next js and apollo in the frontend, and is going absolutly good fine and perfect , and also in the case of action cable , you don't need that, just use pusher more best than everything , well tested proper api, and bla bla bla.
Haha it's all good. I think in general people are going to have a bit of a tribalistic defense of whatever their choice is. For me personally, I'll defend my choice of using the right tool for the job which quite often isn't "The Rails Way" I'm just happy to have a video to link to in the future when I get the odd comment on a video asking me why I didn't use Hotwire instead of If anyone actually gets heated over a video like this, that probably says more about them than anything else lol. How is next js and Apollo working out by the way? I still haven't had the chance to look into nextjs but it seems interesting from what I've seen from Fireship videos
@@Deanin yeah dude people are soo crazy about something that no one cares about , if you use react over hotwire, nobody will care, I am just telling them that you are a content creator and because of that you are teaching everything, I really like next and apollo, it works fine to me, and also I am managing all my libraries with nx monorepo, so in nx you have a folders called app and libs, app is for your apps and cypress e2e and in libs you have your shared libraries with jest and others, and because I maintain 2 startups I can shared that libraries and published them and use them in other apps, it really good, like rails engines
@@Deanin and also take a look at next js , it has a lot of cool features, routes folder structure, in react that is a pain the but, I have a project in react that have more than 100 routes and my index file is like hell, to index on, so that a point for next, and I also you can do any of this fetching technicks , server side rendering, static site generation, client side rendering like react and other 2 that I don't use them that often , and you know the CEO gap of react, next handles that very well, there is a lot , I recommand to take a look at it, have a good day deanin
I’ve been working with Rails for about 13 years or so and the only front end Rails thing I use is their UJS library. Where I work right now, we have a more traditional web app that uses JS on top of server side HTML rendering, and parts that are highly interactive are written in React.
Have you tried Unpoly? For 95% of all projects React is still overkill and you can get a much simpler setup that still behaves like an SPA with Unpoly.
You can bring part of React in Rails. I mean that it can be used as an alternative to view_component with the benefit of React. Also, you are right: a lot of existing projects have multiple backends... thus React being used actually. There is one thing I would not use in a new project: importmap. it looks like coffee script to me ;-) Most of the existing libraries are easier to import using webpack or esbuild (which I prefer over webpack ) Last point: Stimulus! Yep, I like it. I see it as a way to better support Javascript in Rails app. Previous versions of Rails were a bit messy on how to import and structure and reuse JS in Rails projects. Stimulus brings a framework that is structuring JS in Rails projects in a way that is closer to the industry standards. Thanks for sharing your opinion, which I found very balanced and rooted to the real developer's life.
Importmap and Coffeescript is a hilarious comparison, thank you for that haha. Completely agree with you. In general I don't really mind what people use, I think as long as someone has the option to use something and they want to, then more power to them. I'll give them my 2 cents if I feel it's warranted, but then I'll still do a tutorial on it because other people probably need/want to know. Then again, one of the first tutorials I did on this channel was running Python inside a Rails app, so I'm probably not the best influence hahaha.
I personally go with whatever stack throw me at, just give me enough time to get a feel of it. if docs & available resources are good enough! i'm ready to rock. advice for newbie devs: Learn/Understand the architecture not the framework specific features. & also speaking of which tech stack to use its really depend upon scenario, for personal projects go with whatever you want, commercial one needs team discussion before making any decisions yourself, also must look at team expertise, time & budget, client requirements etc.
Yeah, completely agree. I think being able to appreciate the team/business side of it might be something that comes from experience. So that might be on me for losing sight of the fact that not everyone has that experience yet. It's just frustrating seeing how reluctant people can be to help when someone is veering off the DHH path with Rails lol.
What's funny is that the rest of the industry (the React/TypeScript/JavaScript world) is starting to slowly move back toward the monolith architecture. You can see this with the move to things like Remix and RedwoodJS and BlitzJS to a lesser degree.
Thanks for the video. I’m with you on this. I struggle sometimes to understand why there’s so much passion involved in technological decisions. Maybe that’s the main reason system architectural decisions must be taken by the most experienced developers in the project. We need to use the best tool for the scenario always…. And “best tool” must be comply of what’s best within the entire architecture. There can always be middle ground decisions: - there could be a gradual migration from one technology to the other… - there could be some pre-existent skill that is valid to be used for the moment - sometimes you need fast-and-dirty and then you have time to come back and fix later And there are the cases you mentioned: job interview, etc etc There are plenty of real world scenarios… and cheering up for one technology in despite of the other.. is professionally immature
You could make the same argument about any JS framework as well. Using Rails for front end makes a lot of sense in a lot of cases. For me the best reason to learn React is for getting a job, not because it's a better way to build out a Rails app.
Rails backend with react frontend seems like the natural solution to the problem. After learning frontend development react would be the better solution for a responsive interface
How can you tell if someone is a good Rubyist? They hate javascript. 🙂 Seriously, after 3 years in an enterprise with "java/springboot" with React on top, I am longing for a shop with React on Rails. Prior to that job, I was at a place where each departing dev had left their puddle of favorite thing so the various apps were in Ember, Backbone, Marionnette, vanilla jQuery, vanilla javascript and some in Rails. Another job had Rails 2x, 3x, with Coffee script and the guy hated any language that started with a "J", and would not discuss the "R" word (react). Yah, gimme a buttery smooth Rails API and React on the front end and I'm a happy boy.
Has anyone done a deep dive into Svelte vs. Stimulus + Turbo? I like that Svelte lets you compartmentalize all HTML, CSS, and JavaScript together into Svelte files. But beyond that, does anyone know if it has more syntactic sugar or shortcuts for front end things like sorting data or image carousels? I feel like Stimulus has less of that and would require more custom JS.
The other problem is, that companies do not take on Junior RoR devs, because they cost them the first year and than jump ship for a better pay. React might be the way for me to get onboard.
I think there are a lot of contrived examples in this rant that aren’t needed tbh. React is just.. a better framework. Rails is good at backend infrastructure, but the front end stuff is an absolute nightmare. Stimulus + turboframes is just awful to work with for dozens of reasons. If you want to make a VERY simple static website, like the websites we had in the 90s, then rails is the way to go. If you want to make a large, modern application that has dynamic flows and reactive components, react is just far, far better. The hundreds of hours you'll waste trying to debug stimulus and turboframes just isn't worth it
Whatever happened to PI planning? I like your videos but you seem to be a little bias about hotwire, hotwire has been designed for people that know ROR and some JS, and make it easier for them to implement SPAs at a very easy level without having to require them to learn a whole new framework. And yes hotwire isn't all SPA, but it works well for it. And don't forget, that ROR is an amazing framework for creating applications very fast.
I’ll create another comment only to increase the # of comments on the video. Because it talks so much with my opinion I would believe if you say you just read my mind 😂
Yeah but it depends actually. Ember and Rails is a very rare combination not many jobs there. But if you find a junior job in startup then after you have 2-3 years experience with it companies who looks for ember and rails combination, you are the number one candidate most of the time. Thats how I found my abroad job after 1.5 years of experience. I think rails has better community then ember. However you can jump only Ember or Rails job afterwards(which I already did it 4 months ago)@@SeanLazer
So I made another rant... 😅Not aimed at anyone who watches these videos, but I might have received one too made rude DMs because I made a React tutorial, and seen one too many bad Reddit takes recently lol. Don't cancel me pls.
Thanks for your contribution in Rails + React tutorials.
Indeed, the market demand for Rails + React jobs is 10x higher than for Hotwire + Rails jobs.
Thus, going all-in with React is a safer bet.
Me personally, I love the Hotwire approach because it allows me to be much more productive as an solo developer working on a project.
Whereas having React in small projects is overkill.
In large projects it can make more sense.
But again, if it's a project with 4+ devs, you can have a dedicate React person that has nothing to do with Rails, and the Rails devs can just be supplying API endpoints.
So with that logic, it makes no sense for me as a Rails dev to invest my time into enhancing my React skills: I'd better be great at Ruby & Rails API.
Yeah I mean to each their own. I wouldn't expect someone to use React over Hotwire in the same way I don't expect them to use Hotwire over React. It's just an issue for me when people try to pass their opinions off as the optimal solution when some guy is just trying to get a job. Personally covering React and importmaps without JSX made me throw up a little, but that exact video was made because that solution was required for someone's take home interview. So I'm not a fan, but there's clearly demand so when people lose it on Reddit about not doing it the Rails way I'm like, come on man. The person is just trying to feed their family lol.
I used to work in a job where pretty much every problem boiled down to doing it in a ridiculous suboptimal way, so I can appreciate that sometimes your hands are tied lol. I think the epitomy of this was a legacy application that had a literal two week setup process before we wrote some documentation on how to do it and found out you needed to comment out the tests to make it work. 🤡 I wouldn't advise commenting out tests, and yet that ended up being the solution for a solid 3 months 😭
As for the proper Rails way of doing things and Hotwire, I'll never hide that I'm not a Rails dev at heart. That's why I send people to you. 😂 I still get caught using findElementById in my stimulus controllers.
I'm a bit surprised inertiajs isn't talked about more in the rails community. It's basically glue between your server and frontend routing. You get nice routing and ability to just use frontend frameworks for what they excel at, but keep your data handling and state on your server.
The timeliness of this video is spot on for me. I have been tasked with re-writing a legacy Sinatra app in Rails 7. Our current apps all have React frontends (because our FE devs are React devs). Planning out this simple project brought up a lot of questions regarding maintainability for the team. Thank you for sharing your point of view and always being a great resource.
This comment is to help the rails community. You're awesome.
Hey man, I personally feel that rails as a backend api is the best use case for it. But following all the buzz around hotwire I gave it a try last week. It was quite easy to do stuff without touching frontend as what it claims to be but i don't know I just don't feel comfortable enough and I would still go with rails as an api and react in frontend for a project I know is going to be much more than an MVP. Yes hotwire and stimulus could be a savior when we are building a customized admin in rails. Either the whole community has to start using it or it will just remain as a thing as good to know.
Sounds like you need to give Unpoly a try. It can turn any server-side rendered page into an SPA and has a much simpler architecture and doesn't require you to change your backend at all.
RoR + Hotwire is perfect(from my pov) for 1 type of projects - internal systems/portals for enterprises that are not computation-heavy. It will give you fastest development speed, iterations, etc.
Others - it's always a compromise, when you have to take into consideration product market and job market.
This wasn't the video I was looking for but I watched it completely because I highly relate to what you were saying.
I'm finishing a degree which does not have a really good market in my country, so I decided to try programming and started on October of this year. If it is difficult for people to get a junior position just imagine how difficult it is for the ones who don't have a CS background. I know that in Tech it doesn't matter if you're studying a CS degree, but I heard that some platforms can potentially reject applicants if they don't fulfill that background requirement. So one must try to make their profile as marketable as posible, and I think react+rails should be the go way in doing a portfolio for a newbie trying to find their first job.
Guys if you are angry listen to this . Dean is just giving his honest view of this monopoly that guys in reddit do, and plus on that, the stack that I use for my startup is rails in the backend , integrated with graphql because I really love the separations of concern in rails you have models, mailers, resolvers , mutations etc... and next js and apollo in the frontend, and is going absolutly good fine and perfect , and also in the case of action cable , you don't need that, just use pusher more best than everything , well tested proper api, and bla bla bla.
Haha it's all good. I think in general people are going to have a bit of a tribalistic defense of whatever their choice is. For me personally, I'll defend my choice of using the right tool for the job which quite often isn't "The Rails Way"
I'm just happy to have a video to link to in the future when I get the odd comment on a video asking me why I didn't use Hotwire instead of
If anyone actually gets heated over a video like this, that probably says more about them than anything else lol.
How is next js and Apollo working out by the way? I still haven't had the chance to look into nextjs but it seems interesting from what I've seen from Fireship videos
@@Deanin yeah dude people are soo crazy about something that no one cares about , if you use react over hotwire, nobody will care, I am just telling them that you are a content creator and because of that you are teaching everything, I really like next and apollo, it works fine to me, and also I am managing all my libraries with nx monorepo, so in nx you have a folders called app and libs, app is for your apps and cypress e2e and in libs you have your shared libraries with jest and others, and because I maintain 2 startups I can shared that libraries and published them and use them in other apps, it really good, like rails engines
@@Deanin and also take a look at next js , it has a lot of cool features, routes folder structure, in react that is a pain the but, I have a project in react that have more than 100 routes and my index file is like hell, to index on, so that a point for next, and I also you can do any of this fetching technicks , server side rendering, static site generation, client side rendering like react and other 2 that I don't use them that often , and you know the CEO gap of react, next handles that very well, there is a lot , I recommand to take a look at it, have a good day deanin
“Hoping DHH doesn’t reinvent rails again” Love it. I feel like Rails 7 should finally be a way forward. Fingers crossed.
I’ve been working with Rails for about 13 years or so and the only front end Rails thing I use is their UJS library. Where I work right now, we have a more traditional web app that uses JS on top of server side HTML rendering, and parts that are highly interactive are written in React.
Have you tried Unpoly? For 95% of all projects React is still overkill and you can get a much simpler setup that still behaves like an SPA with Unpoly.
@@clumsyjester459 for simple things we mostly use vanilla JS. I haven’t tried Unpoly but I’ll give it a look.
Is everything in a single monolithic app? Or is the react stuff in a different repo/project?
@@user-xedwsg monolithic repo
You can bring part of React in Rails. I mean that it can be used as an alternative to view_component with the benefit of React. Also, you are right: a lot of existing projects have multiple backends... thus React being used actually.
There is one thing I would not use in a new project: importmap. it looks like coffee script to me ;-) Most of the existing libraries are easier to import using webpack or esbuild (which I prefer over webpack )
Last point: Stimulus! Yep, I like it. I see it as a way to better support Javascript in Rails app. Previous versions of Rails were a bit messy on how to import and structure and reuse JS in Rails projects. Stimulus brings a framework that is structuring JS in Rails projects in a way that is closer to the industry standards.
Thanks for sharing your opinion, which I found very balanced and rooted to the real developer's life.
Importmap and Coffeescript is a hilarious comparison, thank you for that haha. Completely agree with you.
In general I don't really mind what people use, I think as long as someone has the option to use something and they want to, then more power to them. I'll give them my 2 cents if I feel it's warranted, but then I'll still do a tutorial on it because other people probably need/want to know.
Then again, one of the first tutorials I did on this channel was running Python inside a Rails app, so I'm probably not the best influence hahaha.
Great rant.. and so true.. Sometimes tech decisions have nothing to do with dev.. There's a FE team already and none want to learn or work in rails..
I personally go with whatever stack throw me at, just give me enough time to get a feel of it. if docs & available resources are good enough! i'm ready to rock. advice for newbie devs: Learn/Understand the architecture not the framework specific features. & also speaking of which tech stack to use its really depend upon scenario, for personal projects go with whatever you want, commercial one needs team discussion before making any decisions yourself, also must look at team expertise, time & budget, client requirements etc.
Yeah, completely agree. I think being able to appreciate the team/business side of it might be something that comes from experience. So that might be on me for losing sight of the fact that not everyone has that experience yet.
It's just frustrating seeing how reluctant people can be to help when someone is veering off the DHH path with Rails lol.
What's funny is that the rest of the industry (the React/TypeScript/JavaScript world) is starting to slowly move back toward the monolith architecture. You can see this with the move to things like Remix and RedwoodJS and BlitzJS to a lesser degree.
Thanks for the video. I’m with you on this.
I struggle sometimes to understand why there’s so much passion involved in technological decisions. Maybe that’s the main reason system architectural decisions must be taken by the most experienced developers in the project.
We need to use the best tool for the scenario always…. And “best tool” must be comply of what’s best within the entire architecture.
There can always be middle ground decisions:
- there could be a gradual migration from one technology to the other…
- there could be some pre-existent skill that is valid to be used for the moment
- sometimes you need fast-and-dirty and then you have time to come back and fix later
And there are the cases you mentioned: job interview, etc etc
There are plenty of real world scenarios… and cheering up for one technology in despite of the other.. is professionally immature
YOU ARE TOTALLY RIGHT, THANKS A MILLION.
Rails frontend doesn't make any sense. Things change every few years
You could make the same argument about any JS framework as well. Using Rails for front end makes a lot of sense in a lot of cases. For me the best reason to learn React is for getting a job, not because it's a better way to build out a Rails app.
@@jl789nzI thought the same as you
They drastically refactor JS frameworks too every year.
Rails backend with react frontend seems like the natural solution to the problem. After learning frontend development react would be the better solution for a responsive interface
Rails is awesome.
How can you tell if someone is a good Rubyist?
They hate javascript. 🙂
Seriously, after 3 years in an enterprise with "java/springboot" with React on top, I am longing for a shop with React on Rails.
Prior to that job, I was at a place where each departing dev had left their puddle of favorite thing so the various apps were in Ember, Backbone, Marionnette, vanilla jQuery, vanilla javascript and some in Rails.
Another job had Rails 2x, 3x, with Coffee script and the guy hated any language that started with a "J", and would not discuss the "R" word (react).
Yah, gimme a buttery smooth Rails API and React on the front end and I'm a happy boy.
You’re 100% right
I so wish I could like this rant again!
I do removed the like and liked it again 😂
Why use React at all?
Good one.
@@Deanin lol
Why would an app need 2 backends
I totally agree with what you say. Thanks for the video.
I feel the need to like this video twice.
Has anyone done a deep dive into Svelte vs. Stimulus + Turbo? I like that Svelte lets you compartmentalize all HTML, CSS, and JavaScript together into Svelte files. But beyond that, does anyone know if it has more syntactic sugar or shortcuts for front end things like sorting data or image carousels? I feel like Stimulus has less of that and would require more custom JS.
Svelte looks amazing I was blown away by it.
The other problem is, that companies do not take on Junior RoR devs, because they cost them the first year and than jump ship for a better pay. React might be the way for me to get onboard.
Casual Wide Dean
I think there are a lot of contrived examples in this rant that aren’t needed tbh. React is just.. a better framework. Rails is good at backend infrastructure, but the front end stuff is an absolute nightmare. Stimulus + turboframes is just awful to work with for dozens of reasons. If you want to make a VERY simple static website, like the websites we had in the 90s, then rails is the way to go. If you want to make a large, modern application that has dynamic flows and reactive components, react is just far, far better. The hundreds of hours you'll waste trying to debug stimulus and turboframes just isn't worth it
I’d definitely appreciate a tutorial on making tutorials
Whatever happened to PI planning? I like your videos but you seem to be a little bias about hotwire, hotwire has been designed for people that know ROR and some JS, and make it easier for them to implement SPAs at a very easy level without having to require them to learn a whole new framework. And yes hotwire isn't all SPA, but it works well for it. And don't forget, that ROR is an amazing framework for creating applications very fast.
I have posted a comment with a link hope it doesn't get flagged.
It didn't get flagged but it also didn't give me a notification for it 😮💨
Uh, well but is this a rant about hotwire? Seems this is more about a very specific case of people advising for frameworks despite nobody asked.
I’ll create another comment only to increase the # of comments on the video. Because it talks so much with my opinion I would believe if you say you just read my mind 😂
I don't like where the RoR is going
You're funny 😂😂
Good video :)
Tell people use Emberjs, Ember + Rails
If someone is trying to get a job I'd say that's not very good advice
Yeah but it depends actually. Ember and Rails is a very rare combination not many jobs there. But if you find a junior job in startup then after you have 2-3 years experience with it companies who looks for ember and rails combination, you are the number one candidate most of the time. Thats how I found my abroad job after 1.5 years of experience. I think rails has better community then ember. However you can jump only Ember or Rails job afterwards(which I already did it 4 months ago)@@SeanLazer
take this ANGRY comment!
Why use react? Because it pays the bills .
The man really compared "market share" of apples and oranges (React vs Rails) by showing number of google searchs, you can't be serious man...