Skip to content

Commit

Permalink
React 18: Update client rendering (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
gildub authored Jun 6, 2024
1 parent 17532d9 commit 7f1e42f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions client/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import ReactDOM from "react-dom/client";

import { createRoot } from 'react-dom/client';
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";

Expand All @@ -25,9 +25,8 @@ dayjs.extend(arraySupport);

const queryClient = new QueryClient();

const root = ReactDOM.createRoot(
document.getElementById("root") as HTMLElement
);
const container = document.getElementById('root');
const root = createRoot(container!)

const renderApp = () => {
return root.render(
Expand Down

0 comments on commit 7f1e42f

Please sign in to comment.