understanding jsx code example
Example 1: javascript in jsx
const name = 'Josh Perez';
const element = Hello, {name}
;
//notice the use of {...} to jump from jsx to javascript.
ReactDOM.render(
element,
document.getElementById('root')
);
Example 2: what is jsx
// JSX is an extension of JavaScript XML.
// Example
const element = Hello, world!
;