NuclearError / react-boilerplate-2022

A boilerplate to quickly get up and running with React, Webpack, and Jest (no CRA!)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Boilerplate

The point of this project is to get away from CRA. It's basically a modern version of the react boilerplates I created years ago back when I didn't work in places that used CRA for everything.

My knowledge on non-CRA react projects was a bit out of date, so this article helped me a lot.

Quick start

npm install
npm run dev

Testing

Tests use Jest and the React ShallowRenderer. Note that the babel.config.js file was necessary in order to get Jest working, along with these devDependencies:

  • @babel/preset-react
  • babel-jest
  • react-test-renderer

(A few other devDependencies were required but these had already been installed as part of the basic react setup.)

To run all tests: npm run test To run a specific test: npm run test App.test.js

ToDo

About

A boilerplate to quickly get up and running with React, Webpack, and Jest (no CRA!)