React · Junior · Question 3 of 75

What does JSX turn into at build time?

Explanation

<h1 className="t">Hi</h1> is compiled (by Babel, SWC, TypeScript) into a call like jsx("h1", { className: "t", children: "Hi" }), which returns a description object. Browsers don't understand JSX, and React doesn't use innerHTML - that's why strings in JSX are escaped automatically.

Further reading

Problem with a question

React · Junior · question 3

Test yourself

Take the React · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz