The benefit of using Rails 6 is that it comes with Webpacker, a Javascript bundler, right out of the box. This means that any Javascript framework/packages will work with little to no work!
You can start a new project by telling it to install dependencies specific to React.
rails new [name] --webpack=react
Head over to the Gemfile and add the react-rails gem.
gem 'react-rails'
We can now tell Rails to add additional files to use React.
rails generate react:install
If you don't have web packer installed, run the following
curl <https://raw.githubusercontent.com/rails/webpacker/master/lib/install/config/webpacker.yml> > config/webpacker.yml
bundle exec rake webpacker:install