DEV Community

Discussion on: A Clean Way to Conditionally Render Components

Collapse
 
thumbone profile image
Bernd Wechner

Forgive the total newb question but what is going on here? I have never seen naked HTML used like that in a Javascript function. What's going on there?

Collapse
 
anxiny profile image
Anxiny • Edited

The function here is used in ReactJS environment.
It's a functional component in React.
This format is called JSX.

Best

Collapse
 
thumbone profile image
Bernd Wechner

Thanks for clarifying. I'd make sure to mention that in the article but perhaps the series is in that context and I just surfed in at a single chapter out of context. Not an unusual use case though so I'd aim to include a very brief intro in each chapter to make a newcomer aware of context I guess.

Thread Thread
 
anxiny profile image
Anxiny

Thanks for point that out!
I will edit the post to add that.

Best

Thread Thread
 
thumbone profile image
Bernd Wechner

All good. Nice article. Alas I don't use React hence clueless on that syntax ;-). But a learning all the same. That's why dev.to is so nice.