Coder Social home page Coder Social logo

points-tax-calculator's Introduction

Points - Take Home Assignment

Author - Vaasu Dhand


Tech Stack

  • React
  • Typescript
  • MUI
  • Vite
  • Jest

Steps to run

  1. npm run install to install the dependencies.
  2. npm run start to start the vite server.
  3. This should launch the app on localhost:3005

A word on Application Design

The application itself is fairly basic. The two main components are <Form /> and <Tax />. I utilized context API as my global state management solution (Redux would be overkill). I wrote two custom hooks to demonstrate my grasp on react hooks.

  1. useCalculateTax() - This hook takes care of making the API call to fetch the Tax brackets and set's the response to ContextAPI.
  2. useTaxContext() - This hook is a better way to use React's Context API. It stores all the state that is being shared amoung components.

What I would have improved, if I had more time:

  1. Tests - I wanted to write more and better tests. Due to the lack of time I could not spare much time for writing tests.
  2. Organizing Types - I wanted to create shared types/interfaces to avoid repetition of TS code.
  3. Content Layout Shifting - The Form and Output shift after the calculate button is clicked.
  4. Prevent Extra API Call - If the year entered stays the same we don't need to re-fetch the data.
  5. Styling - Some more custom CSS would have improved the user experience a lot. CSS is added sugar!

points-tax-calculator's People

Contributors

vaasu-dhand avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.