Skip to content

ColmanDevClubORG/products-axios

Repository files navigation

🛍️ Products Store - React Practice Task

A React application for displaying products from the FakeStore API. Practice using useEffect and useState hooks!


🎯 Your Task

Complete the useEffect hooks in two files to fetch and display products:

  1. Home.jsx - Fetch all products and display them
  2. Details.jsx - Fetch a single product's details

📋 Tasks

Task 1: Home.jsx

Complete the useEffect hook to fetch products:

// API endpoint: 'https://fakestoreapi.com/products'

API Response:

  • Returns an array of products directly (use response.data)

Task 2: Details.jsx

Complete the useEffect hook to fetch a single product:

// API endpoint: https://fakestoreapi.com/products/${productId}


✅ Checklist

  • useEffect implemented in Home.jsx
  • useEffect implemented in Details.jsx
  • Products display on home page
  • Product details display on details page
  • Search functionality works
  • Filter by category works
  • Loading states work
  • Error handling works

📖 API Documentation

  • Base URL: https://fakestoreapi.com
  • All Products: GET /products
  • Single Product: GET /products/{id}

No API key required! 🎉


Good luck! 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •