0.2.1 • Published 2 years ago

cra-template-bast-router v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

React template for create-react-app with React Router

This is the template for Create React App created by Bastion team.

Stack

  • eslint (Airbnb)
  • prettier
  • typescript
  • sass (scss)

Install

To use this template, add --template bast-router when creating a new app.

For example:

npx create-react-app bastion-app-name --template bast-router

# or

yarn create react-app bastion-app-name --template bast-router

File architecture

Recommended file architecture:

  • assets
  • components
  • contexts
  • i18n
  • services
  • utils
  • views

Example

── /src
    ├── /assets
    ├── /components
    │   ├── /forms
    │   │   ├── /TextField
    │   │   │   ├── TextField.ts
    │   │   │   ├── TextField.module.scss
    │   │   │   └── TextField.test.ts
    │   │   ├── /Select
    │   │   │   ├── Select.ts
    │   │   │   ├── Select.styles.ts
    │   │   │   └── Select.test.ts
    │   │   └── index.ts
    │   ├── /routing
    │   │   └── /PrivateRoute
    │   │       ├── /PrivateRoute.ts
    │   │       └── /PrivateRoute.test.ts
    │   └── /layout
    │       └── /navigation
    │           └── /NavBar
    │              ├── NavBar.ts
    │              ├── NavBar.module.scss
    │              └── NavBar.test.ts
    ├── /contexts
    ├── /i18n
    ├── /services
    │   ├── /LocalStorage
    │   │   ├── LocalStorage.ts
    │   │   └── LocalStorage.test.ts
    │   └── index.ts
    ├── /utils
    │   ├── /constants
    │   │   └── countries.ts
    │   └── /helpers
    │       ├── validation.ts
    │       ├── currency.ts
    │       └── array.ts
    ├── /views
    │   ├── Home.tsx
    │   └── About.tsx
    ├── App.module.scss
    ├── App.test.tsx
    ├── App.tsx
    └── index.tsx

More

For more information, please refer to: