React TutorialLesson 18Free preview
React JSX Expressions
This lesson is part of React · All levels
Summary
In JSX you can put a JavaScript expression in it by wrapping it in curly braces. Expressions can be variables, calculations, function naming, or arrays rendered into a list of elements. Everything in {} should be worth, not statements like if or for.
Key points
- Use {} to insert JavaScript expressions into JSX
- The boolean values, null, and undefined do not produce a display
- The array can be rendered directly into a list of elements
- Statements like if and for should not be in {}
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.