Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed React Basics!
You have completed React Basics!
Preview
JSX lets you define your own tags. A JSX tag can not only represent an HTML element (like <h1>, <span>, and <header>), but it can also represent a user-defined component.
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
A JSX tag can not only represent
an HTML element, such as h1 span or
0:00
header, but it can also represent
a user defined component.
0:02
This means that by creating
a component called Header,
0:09
we can use a header tag whenever we
want to display the header component.
0:12
Let me demonstrate this by
rendering the Header component
0:18
to the page using a JSX tag.
0:23
In the root.rendermethod,
0:25
I'll replace the element variable
with a self-closing Header tag.
0:27
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up