Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shyamsundernt/reactday12task
Redux cart task
https://github.com/shyamsundernt/reactday12task
bootstrap css reactjs redux
Last synced: about 8 hours ago
JSON representation
Redux cart task
- Host: GitHub
- URL: https://github.com/shyamsundernt/reactday12task
- Owner: ShyamSunderNT
- Created: 2024-06-06T17:03:36.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-06-06T17:44:32.000Z (8 months ago)
- Last Synced: 2024-06-06T19:30:04.632Z (8 months ago)
- Topics: bootstrap, css, reactjs, redux
- Language: JavaScript
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Redux Cart
This project is a simple shopping cart built with React and Redux. It demonstrates the following features:
- Fetching data from a JSON source.
- Displaying cart items with their prices and quantities.
- Increasing and decreasing the quantity of each item.
- Automatically updating the total quantity and total amount as item quantities change.## Getting Started
## Project Structure
- `src/products.js`: Contains json file.
- `src/cartSlice.js`: Contains the Redux reducer to handle cart actions.
- `src/store.js`: Sets up the Redux store.
- `src/App.js`: Main app component that includes the cart.
- `src/CardCart.js`: Cart component that displays items and handles quantity updates.## Usage
- Increase quantity: Click the `+` button next to an item.
- Decrease quantity: Click the `-` button next to an item.
- Total quantity and total amount will update automatically.## Contributing
Contributions are welcome! Please submit a pull request or open an issue to discuss.
# React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh