newsnow/src/app.tsx
2024-09-29 20:57:24 +08:00

16 lines
470 B
TypeScript

import ReactDOM from "react-dom/client"
import { RouterProvider } from "@tanstack/react-router"
import { QueryClientProvider } from "@tanstack/react-query"
import { queryClient, router } from "./main"
const rootElement = document.getElementById("app")!
if (!rootElement.innerHTML) {
const root = ReactDOM.createRoot(rootElement)
root.render(
<QueryClientProvider client={queryClient}>
<RouterProvider router={router} />
</QueryClientProvider>,
)
}