Skip to content

nitindixit03/React-Ecommerce-Cart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-commerce Website (React + Context + React Router)

This is a simple e-commerce website built using React, React Router DOM, and React Context to manage global state (e.g., shopping cart). The project demonstrates how to implement routing and context in a React application to create an interactive shopping experience.


Features

  • React Router: Seamless navigation between different pages such as Home, Product Detail, Shop (Men, Women, Kids), and Cart.
  • Context API: Global state management for the shopping cart using React's Context API, eliminating the need for prop drilling.
  • Add/Remove Items to Cart: Users can easily add or remove items to/from the cart.
  • Cart Management: Displays the total number of items and calculates the total cost in the cart.

Technologies Used

  • React: A JavaScript library for building dynamic user interfaces.
  • React Router DOM: A library for handling routing within the React application.
  • React Context API: For managing global state across components without the need for prop drilling.
  • CSS: Custom CSS styling for the layout and design.
  • Vite: A fast build tool for modern web projects, providing a streamlined development experience.

Installation

Prerequisites

Make sure you have Node.js and npm installed. You can check if they are installed by running the following commands in your terminal:

node -v
npm -v