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 (4)

Collapse
 
dev_saravanan_journey profile image
Saravanan Lakshmanan

The session was really useful. Thanks again.

Collapse
 
vidhya_murali_5aabe7784bd profile image
vidhya murali

Thank you 😊

Collapse
 
kamalesh_ar_6252544786997 profile image
Kamaleshwar A

Good and well!. Keep it up πŸ‘οΈ

Collapse
 
vidhya_murali_5aabe7784bd profile image
vidhya murali

Thank you for your support ☺️