rendering in react js code example
Example 1: javascript in jsx
const name = 'Josh Perez';
const element = <h1>Hello, {name}</h1>;
//notice the use of {...} to jump from jsx to javascript.
ReactDOM.render(
element,
document.getElementById('root')
);
Example 2: ReactDOM.render()
ReactDOM.render(element, container[, callback])