#Props aren't working

41 messages · Page 1 of 1 (latest)

muted minnow
#

I'm on the Section 2 Solo Project on the React Course – but I'm not able to pass in props to one of my components. Is there anything wrong with my data.js file or my components file?

#

Here's my data.js:

#

Here's app.js:

#

FYI: when I delete the entries section in app.js, everything starts working again, but when I add it back, everything disappears

wide prawn
#

have you checked if the src of the images in data.js fit to your folder directory?

muted minnow
#

yeah they do

#

the problem is that nothing shows up

#

not even the location and description and stuff

random crystal
#

@muted minnow Are you getting any errors in the browser console?

muted minnow
#

i got warnings

random crystal
#

Please upload it to github and send the link, then I can take a closer look

random crystal
muted minnow
#

Oh my bad, one sec

random crystal
#

cool, 2 secs while I set it up

muted minnow
#

^ This is the terminal warning

random crystal
#

always always always check the console in the browser dev tools

#

first troubleshooting step

muted minnow
#

Got it, I'm still not able to see the error tho?

#

So my props weren't able to pass through

random crystal
muted minnow
#

Chrome

random crystal
#

right click on the page and click "inspect"

muted minnow
random crystal
#

Cannot read properties of undefined (reading 'toUpperCase')

muted minnow
#

Did i forget ()

random crystal
#

You are trying to use the toUpperCase function on a property that is undefined

muted minnow
#

Ok

#

So my props weren't able to pass through

random crystal
#

Question: What is e.id?

muted minnow
#

Wait

#

Typo

#

Yeah it works now, I was referring to the scrimba lessons so I might've typed id on accident

#

Tysm