A quick look at how you can build a React application using Ruby on Rails. You can grab all of the code from this video here: https://zayne.io/blog/how-to-create-a-react-app-with-ruby-on-rails
== Overview ==
There are two common methods (at least that I know of) that you can use to create a react app using ruby on rails. The first option is to create 2 separate applications – one for your frontend react app, and a separate rails api. Then you can deploy the react app using something like surge.sh, and deploy the rails API with Heroku or similar.
However, as of I think rails ~5.1, there’s a second option you can use as well. The second option is to create a single application, setting it up with react from the start using webpacker. In this post we will focus on this second option. In this video we are going to take a look at how to build a simple hello world react app with ruby on rails using webpacker.
More on the webpacker gem here: https://github.com/rails/webpacker#react
source
source https://gadgetsteam.com/2019/06/22/build-a-react-app-with-ruby-on-rails/
No comments:
Post a Comment