Skip to content

JSX

JSX is a XML-like syntax extension to ECMAScript without any defined semantics. It's NOT intended to be implemented by engines or browsers. It's NOT a proposal to incorporate JSX into the ECMAScript spec itself. It's intended to be used by various preprocessors (transpilers) to transform these tokens into standard ECMAScript.

Comment

아래와 같이, {/**/}를 사용한다.

{/*<a href="/#" className="special">text</a>*/}

Tips

Use ternaries rather than && in JSX

0 && true // 0
true && 0 // 0
false && true // false
true && '' // ''

See also

Favorite site