Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Ericka Erickson](https://secure.gravatar.com/avatar/dacfec9f259e8dddc671d924b6f22a57?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ericka Erickson
9,982 Pointswhy isnt this is {}
const id = props.id;
why is props.id not in {}
1 Answer
![Travis Alstrand](https://uploads.teamtreehouse.com/production/profile-photos/11658224/micro_travis.jpg)
Travis Alstrand
Data Analysis Techdegree Graduate 49,407 PointsHey Ericka Erickson !
Are you referring to 1:20, inside of Counter.js
?
If so, this is because it's not inside of the return
statement and therefore not a JSX Expression. It's just regular JavaScript here defining the value of a new variable.
If we were trying to display props.id
in the return statement for example, it would need to be in {}
. For example...
return (
<h1>{props.id}</h1>
)
Or...
const id = props.id
return (
<h1>{id}</h1>
)
I hope this makes sense, if you're still having trouble with this topic you can always visit Understanding JSX and Embed JavaScript Expressions in JSX from our React Basics course
![Ericka Erickson](https://secure.gravatar.com/avatar/dacfec9f259e8dddc671d924b6f22a57?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ericka Erickson
9,982 Pointsyes this helps! thank you
![Travis Alstrand](https://uploads.teamtreehouse.com/production/profile-photos/11658224/micro_travis.jpg)
Travis Alstrand
Data Analysis Techdegree Graduate 49,407 PointsAwesome! You're very welcome
Jamie Reardon
Treehouse Project ReviewerJamie Reardon
Treehouse Project ReviewerHi @Ericka Erickson, your question isn't very clear, are you asking why does the property
id
not exist on theprops
object? If so, are you following along with the video's code or your own? It's hard to add further input without having the code related to this.