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 18:15:13 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-06-20 18:15:13 -0700
commitd09194f05a372e3ed136aa288ae76cae8c1dc641 (patch)
treeab7e49f9793bc493d89274773d444ac59c0d3163 /demos/react-fast-refresh-test/src/index.tsx
parent6fbfd696990e77020a3d7359fdcbc3e01de40a60 (diff)
downloadbun-d09194f05a372e3ed136aa288ae76cae8c1dc641.tar.gz
bun-d09194f05a372e3ed136aa288ae76cae8c1dc641.tar.zst
bun-d09194f05a372e3ed136aa288ae76cae8c1dc641.zip
Support live-reload and fallback
Former-commit-id: c3f9d77391589b65951616a632af87107fba469f
Diffstat (limited to 'demos/react-fast-refresh-test/src/index.tsx')
-rw-r--r--demos/react-fast-refresh-test/src/index.tsx11
1 files changed, 3 insertions, 8 deletions
diff --git a/demos/react-fast-refresh-test/src/index.tsx b/demos/react-fast-refresh-test/src/index.tsx
index 3db53a67f..348bd80f2 100644
--- a/demos/react-fast-refresh-test/src/index.tsx
+++ b/demos/react-fast-refresh-test/src/index.tsx
@@ -1,15 +1,10 @@
import ReactDOM from "react-dom";
import React from "react";
-import { Main } from "./main";
+import { App } from "./components/app";
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"));
+ ReactDOM.render(<App />, document.querySelector("#reactroot"));
}
globalThis.addEventListener("DOMContentLoaded", () => {
@@ -17,4 +12,4 @@ globalThis.addEventListener("DOMContentLoaded", () => {
});
startReact();
-export { Base };
+export { App };