Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What I'd like to know is how React and Rails should best interact and I can't seem to figure it out.

Should I ditch Rails altogether? But that doesn't make sense, right? Because React is a front-end thing and Rails is a whole framework. Should React replace Views in Rails then? If so, how? Should I just use Rails as a JSON Api then? In that case, should I not wait for Rails 5? Should I be using Redux, and if so should I be using Webpack? How do I integrate NPM and Webpack with a Rails project?

Aaaaargh. So many questions! :(



I've used react-rails as a way to use React components with low friction in rails views. However, its been a few years now since a significant percentage of rails developers have come to look at Rails as an API layer and use SPAs as the UI, regardless of what client-side framework you use.

Marketwise, Rails is on a long, slow decline. You should definitely broaden your horizons, even if Rails is going to be around for several years yet. You're probably going to see fewer "interesting" Rails projects come up, and a lot more legacy and "mature" applications. Elixir and Phoenix is where I'm putting my attention these days, but there's a lot of interesting work going on server-side these days as well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: