Loading video player...
In this video, I share a real-world problem I faced while migrating from React.js to Next.js. In React Router, I was easily getting dynamic params like: 1.category 2. subcategory 3. brand But in Next.js (App Router), I was only receiving: slug dynamicRoute This caused issues in fetching products correctly for: 1. Category pages 2.Subcategory pages 3. Brand pages π¨ Problem: Routing structure changed, so my previous logic stopped working. β Solution: I fixed it by: 1. Normalizing route params (slug + dynamicRoute) 2. Creating dynamic API endpoint logic 3. Preventing unnecessary re-fetching π‘ What you'll learn: 4. React Router vs Next.js routing difference 3. How to handle dynamic params in Next.js 2. Clean API handling strategy 1. Real-world debugging approach π My Projects: http://ts-geosystems.com.bd If this helps you, donβt forget to like, comment, and subscribe π