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.
- 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.
These instructions will help you set up the project on your local machine for development and testing purposes.
Make sure you have the following installed on your machine:
- Node.js (v14 or later)
- npm (v6 or later) or yarn
- Clone the repository:
git clone https://github.com/your-username/react-book-store.git
- Navigate to the project directory:
cd react-book-store - Install the dependencies:
or
npm install
yarn install
To start the development server, run:
npm startor
yarn startThe 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-nameMake your changes and commit them:
git commit -m 'Add some feature'Push to the branch:
git push origin feature/your-feature-nameCreate 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!