Files
image-studio/view/frontend.tsx
2026-07-03 09:47:05 +02:00

23 lines
643 B
TypeScript

/**
* This file is the entry point for the React app, it sets up the root
* element and renders the App component to the DOM.
*
* It is included in `view/index.html`.
*/
import { createImageStudioApp } from "@app/app";
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { App } from "./App";
const elem = document.getElementById("root")!;
const imageStudioApp = createImageStudioApp();
const app = (
<StrictMode>
<App app={imageStudioApp} />
</StrictMode>
);
// https://bun.com/docs/bundler/hot-reloading#import-meta-hot-data
(import.meta.hot.data.root ??= createRoot(elem)).render(app);