Reading Notes
const element = <h1>Hello, world!</h1>
""
around {}
''
for string values and {}
for expressions, but not both in the same attribute
const element = (
<div>
<h1>Hello!</h1>
<h2>Good to see you here.</h2>
</div>
);
const element = {
type: 'h1',
props: {
className: 'greeting',
children: 'Hello, world!',
}
};
const element = <h1>Hello, world</h1>;
ReactDOM.render(element, document.getElementById('root'));