mosesoak / prequalify-sample-app

Sample Typescript app leveraging Redux Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This project was bootstrapped with Create React App.

Loan Prequalification Sample App

Design Approach

  • Adding the following libraries after initial CRA install: yarn add redux-mock-store @types/redux-mock-store @types/react-test-renderer react-test-renderer @reduxjs/toolkit redux react-redux @types/react-redux
  • Leverage RTK (Redux Toolkit) and React hooks syntax to reduce boilerplate.
    • NOTE: typically in the past I have used React class syntax and Redux connect() without RTK, but our projects also had custom code to get type inference in reducers, which RTK provides for free and I'd like to explore in the building of this sample app.
  • Set up basic Jest snapshot tests for components and tests for redux and possibly api if time
  • Keep everything as simple as possible. I'm not going to use React Final Form, just keep form state in Redux, which I probably wouldn't do in a production app.
  • Not going to use a Router, I'll just mock up a simple one.

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

About

Sample Typescript app leveraging Redux Toolkit


Languages

Language:TypeScript 89.3%Language:HTML 6.3%Language:CSS 4.4%