JSX in React
How JSX works, how to put JavaScript values inside markup, how attributes differ from HTML, and how fragments let you return several elements.
- Level
- Beginner
- Chapters
- 4
- Exercises
- 1
- Reading time
- 14 min
What you will cover
- 1. What JSX IsThe syntax extension that lets you write markup inside JavaScript, and what it compiles to.
- 2. Embedding Values in JSXCurly braces, which values render, and which quietly disappear.
- 3. Attributes and StylingWhy it is className not class, and how the style prop differs from a CSS string.
- 4. Fragments and StructureReturning several elements, self-closing tags and the rules JSX enforces.
Up next after this one: Components and Props