I often use CRA (create-react-app) to initialise React projects, and it’s great, but I always find myself adding/deleting the same files every time before I can actually get started, which is frustrating. Fortunately, CRA offer a templating solution to help you avoid this chore.

What my personal template does:

  • Adds a config file for Prettier (an awesome code formatter) and adds a pre-commit git hook (using Husky) to format all my code on every commit.
  • Deletes all the default CRA .css files and installs Styled Components (my favourite React styling solution).
  • Adds Normalize.css to fix key browser rendering differences.
  • Creates a src/style folder which contains…

Josh Dronsfield

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store