Skip to content

A simple React application that allows users to browse and add books to their cart. The cart displays the selected books, their quantities, and the total price

License

Notifications You must be signed in to change notification settings

PK7108/Book-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Book Store

Welcome to the React Book Store! This is a simple React application that allows users to browse and add books to their cart. The cart displays the selected books, their quantities, and the total price.

Features

  • Display a list of available books with details such as title, language, pages, and price.
  • Add books to the cart.
  • Remove books from the cart.
  • Display the total price of the books in the cart.
  • Responsive design for a better user experience.

Getting Started

These instructions will help you set up the project on your local machine for development and testing purposes.

Prerequisites

Make sure you have the following installed on your machine:

  • Node.js (v14 or later)
  • npm (v6 or later) or yarn

Installation

  1. Clone the repository:
    git clone https://github.com/your-username/react-book-store.git
  2. Navigate to the project directory:
    cd react-book-store
  3. Install the dependencies:
    npm install
    or
    yarn install

Running the Application

To start the development server, run:

npm start

or

yarn start

The application will open in your default browser at http://localhost:3000.

Project Structure src/ components/ BookDetails.js - Component to display book details and add to cart button. Cart.js - Component to display the cart with added books and total price. addbutton.js - Component for the add to cart and remove buttons. images/ - Folder containing book images. App.js - Main component that includes the book list and cart. App.css - CSS file for styling the application. index.js - Entry point of the application. Customization You can customize the book list by modifying the App.js file. Add or remove books by updating the book1, book2, and book3 objects.

Contributing If you would like to contribute to this project, please follow these steps:

Fork the repository. Create a new branch:

git checkout -b feature/your-feature-name

Make your changes and commit them:

git commit -m 'Add some feature'

Push to the branch:

git push origin feature/your-feature-name

Create a pull request. License This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments React - A JavaScript library for building user interfaces. Create React App - Set up a modern web app by running one command. Enjoy building and enhancing your React Book Store!

About

A simple React application that allows users to browse and add books to their cart. The cart displays the selected books, their quantities, and the total price

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published