Skip to main content

ReactJS with Rails

Javascript • Asked by Tony Brown

I'd love to see a series on a real world app using ReactJS with Rails API.


Absolutely. I think the main thing I need to figure out is what's a good, somewhat small real world app I can do as an example. It's always hard to come up with something that isn't contrived feeling.

Hit me with your ideas!


Maybe a yelp clone with TDD using Mocha and Chai or Jest?

That's the first thing off the top of my head. I'd love to see the whole process, using postgresql or MongoDB?

Easier said then done but thanks for taking it into consideration :)


Hmm, I'm not sure Yelp would be a great one to showcase React because really the site doesn't have that much interactivity so you wouldn't really need any frontend frameworks for it.

Something like Facebook on the otherhand has a lot of interactive widgets where it would make sense. Each post has its own dropdown menus, every chat box is independent, all kinds of various little pieces of state for each section of the site. Facebook may be too overused as an example, but I'm trying to think of something in line with that.

I guess now that I'm writing this, of course Facebook is the obvious choice because they invented it. Hah.


lol

I think any CRUD application would be suffient?
Maybe a movie rating app or a dating app?


You use Imgur at all? It's pretty similar to a movie rating app since it has ratings and stuff. I was kinda thinking something like their collapsible comments and/or navigation which are a pretty good showcase for like the usefulness of a JS framework. You can't do that easily without a good amount of JS for sure.


Chris, you could also use some react+redux apps that are available on some of the MOOC platforms, like these:

https://www.udemy.com/reactjs-building-production-ready-apps-start-to-finish/
https://www.udemy.com/the-complete-react-web-app-developer-course/

So you could focus on the rails API and how to connect the rails API to react apps instead of explaining react and redux.

Those courses only cost around $10-15, but since your screencast would be free ad for them, I guess they would provide the source code for free.



I also did that one (it's the best probably), but it only has smaller apps.


I've never used React before so this comment may be irrelevant, but would it make sense to wait for Rails 5.1 to make a React series when Yarn and Webpack are available in Rails?


Its all here (ruby 2.4.2, rails 5.1.4) would be a great tutorial. Lets go! how about also using webpacker-react gem which is really nice.


Sounds good to me. As someone who has still yet to use React in my Rails app, @Henrik, why do you recommend using webpacker-react over react-rails or react_on_rails ? Or why use any of these gems in the first place and just not use the Rails defaults?


Haven't tried the others. Found the helpers useful.


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 24,647+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.