https://github.com/german-zarate/shopping_cart
A sample React shopping cart web app demo with custom hooks
https://github.com/german-zarate/shopping_cart
ecommerce hooks react redux
Last synced: 4 months ago
JSON representation
A sample React shopping cart web app demo with custom hooks
- Host: GitHub
- URL: https://github.com/german-zarate/shopping_cart
- Owner: german-zarate
- Created: 2024-05-14T06:44:20.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-14T06:45:14.000Z (about 1 year ago)
- Last Synced: 2024-12-05T15:12:05.488Z (6 months ago)
- Topics: ecommerce, hooks, react, redux
- Language: TypeScript
- Homepage:
- Size: 726 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Shopping Cart Example
A sample React shopping cart web app demo with custom hooks

## Introduction
****
A simple web app that allows a user to add supermarket items to a basket and remove items from the basket.
The app automatically calculate and display the costs of the items, and the total amount to pay.The shop needs to allow the user to add these items to the basket:
Face Masks (£2.50 each)
Toilet Paper (65p per roll)## Getting started
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](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.### `npm test`
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.### `npm run 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!## Custom Hooks Usage
- `useAddItem.tsx` - Add an item to basket
- `useCart.tsx` - Get cart items
- `useRemoveItem.tsx` - Remove an item from basket