This is a simple React application for searching and displaying product information using the FakeStoreAPI. The app allows users to search for products and view detailed information about each product.
-
SearchBox Component: Provides a search input for users to enter product names. It fetches product data from the FakeStoreAPI and dynamically updates the displayed products as the user types.
-
ProductDetail Component: Displays detailed information about a selected product. It fetches the details from the API based on the product ID provided in the URL.
-
React Router: Used for handling navigation between the search page and individual product detail pages.
-
Error Handling: Implemented error messages for scenarios such as no matching products, API failures, and invalid product IDs.
I chose the FakeStoreAPI for this project because it provides a simple and easy-to-use API with realistic product data. It allows for a straightforward implementation of a product search and detail display functionality.
-
Clone the repository:
git clone https://github.com/hasanjunaid/SmartShopQuery.git
-
Navigate to the project directory:
cd smartshopquery
-
Install dependencies:
npm install
-
Run the application:
npm run dev
-
Open your browser and go to http://localhost:5713 to view the app.
You can access the deployed version of Smart Shop Query at https://smartshopquery.netlify.app/
For any inquiries or suggestions, feel free to reach out to Muhammad Hasan Junaid (mailto: [email protected]).
This project is licensed under the MIT License.