This tutorial explains the difference between a “statement” and an “expression” in JavaScript. Most of those JSX rules you've had to memorize, and always forget to follow, are the result of this duality. This tutorial assumes that you're comfortable with basic JavaScript syntax, but is otherwise written to be beginner-friendly.

5m read timeFrom joshwcomeau.com
Post cover image
Table of contents
IntroductionLink to this heading ExpressionsLink to this heading StatementsLink to this heading Expressions as statementsLink to this heading Practical implications in React
4 Comments

Sort: