Project Overview: This React Native shopping cart app enables users to:
- View available products.
- Add items to their cart.
- Remove items from their cart.
- View the cart contents. The app uses Local Storage (via AsyncStorage) to store selected items locally on the device.
Design Choices:
- React Native:
- Chosen for cross-platform capabilities and ease of mobile app development.
- Local Storage (AsyncStorage):
- Implemented for simplicity and performance.
- Component-Based Architecture:
- Functional components ensure modularity and reusability.
- State Management:
- React's
useState
anduseEffect
hooks handle local state and lifecycle management.
- React's
Screens and Components:
- HomeScreen:
- Lists available products.
- Provides "Add to Cart" buttons.
- CartScreen:
-
Displays selected items.
-
Offers "Remove from Cart" buttons.
Screenshots
-