aboutsummaryrefslogtreecommitdiff
path: root/demos/react-fast-refresh-test/src/index.tsx
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-06-20 17:38:55 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-06-20 17:38:55 -0700
commit6fbfd696990e77020a3d7359fdcbc3e01de40a60 (patch)
tree2660af3a4a2ed0cd4df582e7e177d6ae644c5b98 /demos/react-fast-refresh-test/src/index.tsx
parent7b549c655161064402a5e10ccc6498c9a05132a3 (diff)
downloadbun-6fbfd696990e77020a3d7359fdcbc3e01de40a60.tar.gz
bun-6fbfd696990e77020a3d7359fdcbc3e01de40a60.tar.zst
bun-6fbfd696990e77020a3d7359fdcbc3e01de40a60.zip
Rename CSS stress test
Former-commit-id: cbb6f8b1a94e504cce875f90b45416177c9ac1d3
Diffstat (limited to 'demos/react-fast-refresh-test/src/index.tsx')
-rw-r--r--demos/react-fast-refresh-test/src/index.tsx20
1 files changed, 20 insertions, 0 deletions
diff --git a/demos/react-fast-refresh-test/src/index.tsx b/demos/react-fast-refresh-test/src/index.tsx
new file mode 100644
index 000000000..3db53a67f
--- /dev/null
+++ b/demos/react-fast-refresh-test/src/index.tsx
@@ -0,0 +1,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 };