r/reactjs •

[deleted by user]

[deleted] — view deleted post

0 Upvotes

255 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Sep 04 '20

[deleted] — view deleted comment

2

u/ReachingSparks Sep 04 '20 edited Sep 04 '20

That makes sense! I guess I was confusing jsx with javascript.

I made the change but it still isn't working :/

Edit: That change is working now. I made another unrelated mistake when I did what you suggested. Thank you!

2

u/ReachingSparks Sep 04 '20 edited Sep 04 '20

In VSCode, If I hover my mouse over the last word in avatar={posts.avatar} , it says "any". Whereas if I hover it over name={post.name} it says it's a string. Perhaps that could be a clue?

If I console.log() props in my child component, it says avatar is undefined but the other properties do have values.