Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amsa2002/mycart-usecontext
Shopping cart application only using usecontext
https://github.com/amsa2002/mycart-usecontext
bootstrap css html javascript react usecontext
Last synced: 6 days ago
JSON representation
Shopping cart application only using usecontext
- Host: GitHub
- URL: https://github.com/amsa2002/mycart-usecontext
- Owner: amsa2002
- Created: 2024-04-04T03:27:06.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-04T03:39:04.000Z (9 months ago)
- Last Synced: 2024-04-04T04:32:19.218Z (9 months ago)
- Topics: bootstrap, css, html, javascript, react, usecontext
- Language: JavaScript
- Homepage: https://mycart-usecontext.vercel.app
- Size: 204 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Shopping Cart Application with ContextAPI
This is a simple shopping cart application built using React and ContextAPI. The application fetches product data from a JSON source and allows users to add items to the cart, adjust quantities, and view the total quantity and amount.
Functionalities:-
Fetching Product Data: The application fetches product data from a JSON source.Cart Page: The cart page displays each item with its price, quantity, total quantity, and total amount.
Adjust Quantity: Users can increase or decrease the quantity of each item, which automatically updates the total quantity and amount.
Technologies Used:-
React
ContextAPIImplementation Details:-
ShopContext.js: Defines a context for managing the state of the shopping cart. It provides functions for adding/removing items from the cart and calculating total quantity and amount.NavBar.js: Displays navigation links.
ProductList.js: Displays a list of products fetched from the JSON source. Allows users to click on a product to view its details.
ProductDisplay.js: Displays the details of a selected product. Users can add the product to the cart from this page.
App.js: The main component that renders other components within the application.
index.js: The entry point of the application.