Home > Blockchain >  React props "undefined" in child component
React props "undefined" in child component

Time:12-04

I'm following a YouTube tutorial about a ReactJS project (https://www.youtube.com/watch?v=IATOicvih5A&t=3872s). It's basically a TikTok clone with an Astra Database using Netlify CLI to run a local development server. So far so great!

However, in the tutorial I'm stuck at around 1:04:00 when she's passing the user data prop to the Card component. Passing the props to the Card component works, when I console.log it shows up in my browser console but whenever I try to use the prop (ie: <p className="username">{user.name}</p> I get an "undefined" error. I just don't get why it works on her project and not on mine, I even tried copy pasting her code to my project but it still doesn't work. Any help would be greatly appreciated please

  • Related