/* We can add attributes to the JSX elements,
for example id and class, the same as in HTML! */
import React from "react";
import ReactDOM from "react-dom";
const App = () => {
const id = "some-id";
return (
<div>
<h1 id={id}>This is a heading</h1>
<h2 className="active">This is another heading</h2>
</div>
);
};
/* Note that in React, we need to use className instead of class.*/
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);