Skip to content

an‌ ‌ application‌ ‌ that‌ ‌ dynamically‌ ‌ generates‌ ‌ form‌ ‌ inputs‌ ‌ from‌ ‌ a‌ ‌ provided‌ ‌ JSON‌ ‌ configuration‌‌

Notifications You must be signed in to change notification settings

jnorris-cs/norris-loans

Repository files navigation

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

About

an‌ ‌ application‌ ‌ that‌ ‌ dynamically‌ ‌ generates‌ ‌ form‌ ‌ inputs‌ ‌ from‌ ‌ a‌ ‌ provided‌ ‌ JSON‌ ‌ configuration‌‌

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published