Skip to content

Create React App template with Redux, TypeScript, React Router, ESlint, Prettier

License

Notifications You must be signed in to change notification settings

ciklum-digital/cra-template-typescript-redux

 
 

Repository files navigation

npm version

A quick start Redux + TypeScript Create React App template

An opinionated quick start Create React App (CRA) template with configured Redux, TypeScript, React Router, Enzyme and custom ESlint configuration.

Original Create React App README available here

Usage

npx create-react-app your-project-name --template @ciklum-digital/cra-template-typescript-redux

Or

yarn create react-app your-project-name --template @ciklum-digital/cra-template-typescript-redux

npx command installs the most recent stable version of CRA from npm.

--template parameter points to this template, note that cra-template- prefix is omitted.

Scripts

In the project directory, you can run:

  • yarn start - runs the app in the development mode. Open http://localhost:3000 to view it in the browser.

  • yarn test - launches the test runner in the interactive watch mode.

  • yarn build - builds the app for production to the build folder.

  • yarn eject - exposes content of react-script package

  • yarn lint - lints project files according to eslint rules, see below.

  • yarn fix - same as yarn lint, but also fixes errors, when possible.

Redux configuration

The template provides basic Redux configuration with feature based folder structure. You can use Redux devtools browser extension. Sample feature included in src/features folder, note technology agnostic features folder name. Based on Redux maintainers recommendation.

Testing

Testing is done with Enzyme.

I added prettier to force consistent formatting. Don't like trailing semicolons? Feel free to tweak prettier rules inside .prettierrc file to match your code style.

Eslint configurations

The template extends CRA ESLint rules with a custom set, tailored for the reasonable and clean development process.

Eslint rules are commented for your convenience feel free to tweak or remove them inside .eslintrc. No judgment.

About

Create React App template with Redux, TypeScript, React Router, ESlint, Prettier

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 74.8%
  • HTML 17.5%
  • CSS 4.2%
  • JavaScript 3.5%