blob: c0f0ec1810e7aad4dc9998aabc2b6593ed3801dd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import ReactDOM from "react-dom";
import { Button } from "./components/button";
const Base = ({}) => {
return (
<main>
<h1>I am the page</h1>
<h3>Here is some text</h3>
<Button
label="Do not click."
onClick={() => alert("I told u not to click!")}
></Button>
</main>
);
};
function startReact() {
ReactDOM.render(() => <Base />, document.querySelector("#reactroot"));
}
globalThis.addEventListener("DOMContentLoaded", () => {
startReact();
});
|