Skip to content

jvaladas/shopping-list-react-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shopping List React Exercises

React project that aims to help less experienced developers quickly get hands-on experience in React. The goal is to add functionality and styling issues should be overlooked!

Feel free to make suggetions/improvements and even tag me if you want a code review to your solution :)

Table of Contents

Installation

  1. Clone this project to your computer with:
git clone https://github.com/jvaladas/shopping-list-react-exercises.git
  1. Move to the project root directory and install packages:
cd shopping-list-react-exercises
yarn install

Usage

  1. Run in the console:
yarn run dev
  1. Access it through the browser at http://localhost:3000 and you should see the following:

Screenshot 2022-07-03 at 12 52 21

Exercises

  1. Format the Price colum so all prices are shown with 2 decimal cases (ex: 2.50€).

  2. Add the correct Total amount at the bottom of the shopping list. It currently shows 1.00€ but we want it to show the sum of all our items, while taking into account their quantities.

    For example: 2 Avocados (0.75€ each) + 1 Milk (1.30€ each) should show a Total Amount of 2.80€

  3. The list has repeated items. Figure out a way to show the repeated items as part of the same item.

    For example 4 Strawberries + 2 Strawberries should show in the list as a single Strawberry line with quantity 6.

  4. Changing the item quantity in the dropdown does not influence the Total Amount. Find a way to modify the quantity of a single item and have that reflect on the Total Amount.

  5. Clicking on the Delete column of a single item should remove it from the Shopping List and the Total Amount should reflect its removal.

That's it! I hope you have fun solving these exercises and that you also find them challenging :D

About

Fun and simple React exercises :)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published