diff options
Diffstat (limited to 'examples/css-stress-test/src/index.tsx')
-rw-r--r-- | examples/css-stress-test/src/index.tsx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/css-stress-test/src/index.tsx b/examples/css-stress-test/src/index.tsx new file mode 100644 index 000000000..4c288c3cc --- /dev/null +++ b/examples/css-stress-test/src/index.tsx @@ -0,0 +1,25 @@ +import { Main } from "./main"; +import classNames from "classnames"; +import ReactDOM from "react-dom"; + +const Base = ({}) => { + const name = + typeof location !== "undefined" + ? decodeURIComponent(location.search.substring(1)) + : null; + return <Main productName={name || "asdasdasdasdasdasd"} />; +}; + +function startReact() { + ReactDOM.hydrate(<Base />, document.querySelector("#reactroot")); +} + +if (typeof window !== "undefined") { + globalThis.addEventListener("DOMContentLoaded", () => { + startReact(); + }); + + startReact(); +} + +export { Base }; |