React TutorialLesson 17Free preview
React JSX Intro
This lesson is part of React · All levels
Summary
JSX is short for JavaScript XML, which is a syntax that allows you to write HTML-like markup directly into JavaScript code. The JSX-containing files were compiled by Babel into a regular JavaScript function before running in the browser. It's important to remember that JSX is not HTML, for example class attributes should be written className.
Key points
- JSX produces the object React element, not the HTML string
- Babylon transposes JSX into a function
- The name of a particular HTML attribute is changed, for example class to className
- JavaScript expressions in JSX wrapped in curly braces
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.