aboutsummaryrefslogtreecommitdiff
path: root/demos/react-fast-refresh-test/src/index.tsx
blob: 3db53a67f5902e6386331e0b58d6f851ad22a1a1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import ReactDOM from "react-dom";
import React from "react";
import { Main } from "./main";
import classNames from "classnames";

const Base = ({}) => {
  const name = decodeURIComponent(location.search.substring(1));
  return <Main productName={name || "Bundler"} />;
};

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

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

export { Base };