Skip to content

Latest commit

 

History

History
119 lines (83 loc) · 3.58 KB

README.md

File metadata and controls

119 lines (83 loc) · 3.58 KB

React Redux Shoppingcart

Welcome to the React Redux Shoppingcart project! This small project is designed to help learners get acquainted with essential libraries in the React ecosystem, including Redux, React Router DOM, React Icons, Redux Toolkit, and TailwindCSS.

By building this simple shopping cart application, you'll gain practical experience in:

  • React fundamentals
  • State management with Redux Toolkit
  • Routing with React Router DOM
  • UI styling with TailwindCSS
  • Using React Icons for a better UI/UX

Table of Contents

Getting Started

To get started with this project, clone the repository and follow the installation instructions below.

Prerequisites

Ensure you have the following installed on your machine:

Features

  • React: Build reusable UI components.
  • Redux Toolkit: Manage application-wide state in a predictable manner.
  • React Router DOM: Handle routing for different pages (e.g., Home, Products, Cart).
  • TailwindCSS: Style the application efficiently using utility-first CSS.
  • React Icons: Integrate icons to improve the user interface.

Technologies

  • React: Frontend framework for building user interfaces.
  • Redux Toolkit: Efficient state management library.
  • React Router DOM: Library for managing routing in React apps.
  • TailwindCSS: Utility-first CSS framework for fast and scalable styling.
  • React Icons: Icon library that includes popular icon sets for React apps.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/react-redux-shoppingcart.git
    cd react-redux-shoppingcart
  2. Install dependencies:

    npm install
    # or
    yarn install
  3. Start the development server:

    npm start
    # or
    yarn start

    The app will be running on http://localhost:3000.

Folder Structure

Here's an overview of the folder structure in this project:

react-redux-shoppingcart/
├── public/
├── src/
│   ├── components/      # Reusable components (e.g., Navbar, ProductCard)
│   ├── features/        # Redux slices for managing state (e.g., cartSlice)
│   ├── pages/           # Different pages for the app (e.g., Home, Cart)
│   ├── App.js           # Main app component
│   ├── store/store.js   # Redux store configuration
│   └── index.js         # Entry point for the React app
├── tailwind.config.js   # TailwindCSS configuration
├── package.json
└── README.md

Usage

Once the project is set up, you can explore the following:

  1. Home Page: Displays the available products.
  2. Product Page: View details of individual products.
  3. Shopping Cart: Add products to the cart and manage the quantity.

Example

You can start by adding products to the shopping cart and see how the Redux Toolkit manages the state. Navigate between different pages using React Router DOM.

Contributing

Contributions are welcome! If you find any bugs or have suggestions for improvement, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more information.


Happy coding and enjoy learning React and Redux! 😊