aboutsummaryrefslogtreecommitdiff
path: root/demos/simple-react/src/index.tsx
blob: 41b0d56ac452c9516c5cbfb3e5c45291de626edc (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
24
25
26
27
28
29
30
import ReactDOM from "react-dom";
import React from "react";
import { Button } from "./components/button";
import classNames from "classnames";

const Base = ({}) => {
  return (
    <main className={classNames("main")}>
      <h3 className={classNames("hi")}>Here is some text</h3>
      <h3 className={classNames("extremely")}></h3>
      <>Fargment!1239899s</>

      <Button
        label="Do notencoding! cl1ick."
        onClick={() => alert("I told u not to click!")}
      ></Button>
    </main>
  );
};

function startReact() {
  ReactDOM.render(<Base />, document.querySelector("#reactroot"));
}

globalThis.addEventListener("DOMContentLoaded", () => {
  startReact();
});
startReact();

export { Base };