I have started a new project in which I would like to use React and Rails. This project is on the small side and will require some basic interactive UI, hence React. As far as I know there are two ways I could get started with this:
- Using the react-rails gem and use the built in view helper
- Create a Rails API and React/Flux frontend app
I have a few questions however. In no particular order:
- React-rails seems like the simpler solution, but what drawbacks would I be facing?
- I come from a Rails and Ember background so the Rails API + React FE solution makes architectural sense to me. But with the react-rails gem I'm confused on how some things should be done. Primarily, how do I handle routing? I suppose I won't have access to any react route helpers and will need to pass paths into the react components as props?
Thanks in advance!
JSXversion of code samples from the tutorial).