SaFi Bank Space : Back-office FE

Technologies

React Tools and Libraries

Best practices

  • Always lint your code before pushing

    • Don’t turn off linting rules unless in mock/temporary code or you have a really good reason

  • JS

    • Use arrow functions

    • Prefer null (to undefined)

  • TS

    • type vs interface
      Use types (not interfaces)

    • use string literal unions (type Pets = 'Fish' | 'Cat') over enums

  • React

    • Use hooks (not HOCs)

    • Use index.ts (only) to re-export components from their folders

    • React query hook keys should be camel case

  • .env

Project structure

The root of the project is SaFiMono/app-bo

public
scripts
src
├╴clients
├╴components
| ├╴Abc
| | ├╴Abc.tsx
| | └╴index.ts
| └╴...
├╴hooks
├╴pages
├╴types
├╴__tests__
└╴mocks