Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

greyscaled/cra-template-typescript

Repository files navigation

@vapurrmaid/cra-template-typescript

@vapurrmaid's opinionated TypeScript React setup

Installation

npx create-react-app <name> --template @vapurrmaid/cra-template-typescript

Project Structure

The shell project placed a .gitkeep placeholder in each of the following:

  • components/:
    • Reusable components
  • contexts/
    • React.Contexts (global, or higher-level scope)
  • entities/
    • Domain logic
  • pages/
    • Complete views built from components etc. May contain localized components, contexts, hooks
  • utils/
    • Language/library extensions

These aren't the only forseeable organizational units. For example services or api may be another commonly used directory.

Stack

  • TypeScript
  • React
  • TypeStyle

Tooling

  • @vapurrmaid/prettier-config source
  • @typescript-eslint, configured with the following source:
    • eslint:recommended
    • plugin:@typescript-eslint/recommended
    • plugin:react/recommended
    • plugin:react-hooks/recommended