Photo by Nick Croft | Volcan de Acatenango, Guatemala
It appears you can not use
--webpack=react together when creating a new Rails App. It’s a shame, because having Rails handle the backend and React, or other JS framework, handle the frontend is a common setup. But it is possible to add webpacker to an api App and use HtmlWebpackPlugin to serve the webpack bundles.
I’ve always been fascinated with linters, code formatters and other static analysis tools. For Ruby, Rubocop is king, it will enforce many of the guidelines outlined in the community’s Ruby Style Guide, but it’s flexible enough for you to decide how to write your code. Setting up Rubocop when first starting a project allows you to quickly fix all the initial offenses (150+ for a vanilla Rails installation, see below) and analyze your code constantly (on save, on commit, before accepting a pull requests) to keep your project offense free.