Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 1.62 KB

README.md

File metadata and controls

45 lines (29 loc) · 1.62 KB

Norris Loans

Getting Started

  1. Install the dependencies: yarn install
  2. start rspack dev server: yarn dev

Other important commands

Command Description
yarn clean runs eslint and prettier
yarn typecheck checks types
yarn test runs tests
yarn test:update runs tests and updates snapshots

Testing

enter bad into string fields or a number containing 99 in money fields to simulate an api error.

Points of interests

Business logic is consolidated into two places.

  • This component keeps the whole form object in global state.
  • It uses react context to pass getters and setters to individual fields.
  • This keeps the state for each individual fields
  • It keeps the form state: focus, validation results, etc.
  • It handles updating the pretend external api and displaying saving indicators
  • It updates global state via the context getters and setters.

Notable External Libraries

Library Description
Tachyons lightweight css library

Component Hierarchy

Preview