This is an opinionated batteries-included TypeScript template for Create React App. It includes my preferred folder structure and a number of packages I find myself using all the time, including:
- Redux toolkit
- Styled Components and Styled normalize
- React Router
- Absolute paths
It is based on the official typescript template.
To use this template, add --template veraclins
when creating a new app.
For example:
npx create-react-app my-app --template veraclins
# or
yarn create react-app my-app --template veraclins
This template comes with Eslint and Prettier configurations for linting the application. To use it, you need to install the plugins and config. This you can do by running
yarn add --dev @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-plugin-prettier eslint-plugin-react-hooks eslint-plugin-react prettier
or
npm install --dev @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-plugin-prettier eslint-plugin-react-hooks eslint-plugin-react prettier
For more information, please refer to:
- Getting Started – How to create a new app.
- User Guide – How to develop apps bootstrapped with Create React App.