SI-Encoding / amazon-clone-flask

Co-developed containerized Flask and React eCommerce store with payment processor and 2FA verification
1 stars 0 forks source link

Refactoring react components #39

Closed darren277 closed 2 years ago

darren277 commented 2 years ago

Code Review Checklist

Description

Completely refactored our React components into as many sub components as possible.

This was done in order to accomplish several outcomes:

  1. Semantically named components.
  2. Smaller components for easier readability and modification.
  3. To allow for component reuse.

One major result was the discovery of some duplicated components accomplishing the same thing. A primary example is the ProductQuantity code used for adding to and removing from the shopping cart. This cart mutability functionality is found throughout the codebase inside of numerous UI components and so it makes a lot more sense to reuse them rather than redefine them.

Type of change

How was it tested?