diff options
author | 2021-06-20 17:38:55 -0700 | |
---|---|---|
committer | 2021-06-20 17:38:55 -0700 | |
commit | cbb6f8b1a94e504cce875f90b45416177c9ac1d3 (patch) | |
tree | 2bb8c501f67c8af954971133a25e1e83db772ed2 /demos/react-fast-refresh-test/src/index.tsx | |
parent | 88ac58962ea92707f3bcc87684c7edba02391c63 (diff) | |
download | bun-cbb6f8b1a94e504cce875f90b45416177c9ac1d3.tar.gz bun-cbb6f8b1a94e504cce875f90b45416177c9ac1d3.tar.zst bun-cbb6f8b1a94e504cce875f90b45416177c9ac1d3.zip |
Rename CSS stress test
Diffstat (limited to 'demos/react-fast-refresh-test/src/index.tsx')
-rw-r--r-- | demos/react-fast-refresh-test/src/index.tsx | 20 |
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 }; |