import ReactDOM from "https://esm.sh/react-dom";
import React, { useState, useEffect } from "https://esm.sh/react@18.0.0";
function TestComponent() {
return <div>Test Component</div>;
}
export function App() {
const [isReady, setIsReady] = useState(false);
useEffect(() => {
setIsReady(true);
}, []);
if (!isReady) {
return <div>Loading...</div>;
}
return (
<>
<div style={{ position: "fixed", inset: 0 }}>
<TestComponent />
</div>
</>
);
}
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(<App />);