What is JSX and how does it work?
Answer
•JSX is a syntax similar to HTML in JS.
•Compiled into React.createElement calls.
•You can write expressions {expr} inside.
•Attributes are props.
•Must have one root element (or Fragment).
Was this answer helpful?