DEV Community

vidhya murali
vidhya murali

Posted on

My React Learning Journey: From Routing to API Integration

Today, I had a great opportunity to take a React class for my friends who are learning React along with me.

Instead of just learning concepts individually, I tried to explain them with live demos and a real-world e-commerce project.

📌 Topics I Covered
I started with React Router, where I explained:

  • BrowserRouter
  • Routes
  • Route
  • Link
  • NavLink
  • Outlet
  • useNavigate
  • useParams

I also demonstrated how these concepts work together to create smooth navigation and nested routing in React applications.

🔄 State Management with useContext
Next, I explained useContext and how it helps avoid unnecessary prop drilling.

I used my recent E-commerce project as a practical example and showed how I managed the cart functionality using Context API, including the View Cart section.

🛒 E-commerce Project Overview
I gave an overview of my recent e-commerce website and explained how I implemented:

  • React Router for navigation
  • useContext for cart management
  • Search functionality
  • Product listing
  • View Cart
  • Dynamic product pages

This helped connect the theoretical concepts with a real application.

🌐 API & Data Fetching

Finally, I introduced APIs and explained how React applications communicate with external APIs.

For the live demo, I used Fake Store API and showed how to fetch product data using:

  • fetch()
  • axios

I also explained how the API response can be stored in state and displayed dynamically using .map().

💡 What I Learned

Teaching others helped me realize that explaining a concept is one of the best ways to understand it deeply.

It also improved my confidence in explaining technical concepts and connecting multiple React concepts together in a real-world project.

Learn → Build → Explain → Learn Better. 🚀

Top comments (0)