diff --git a/src/js/src/index.tsx b/src/js/src/index.tsx
index 51a387f3..c84f8309 100644
--- a/src/js/src/index.tsx
+++ b/src/js/src/index.tsx
@@ -1,6 +1,6 @@
import { ReactPyDjangoClient } from "./client";
import React from "react";
-import ReactDOM from "react-dom";
+import { createRoot } from "react-dom";
import { Layout } from "@reactpy/client/src/components";
export function mountComponent(
@@ -77,5 +77,6 @@ export function mountComponent(
}
// Start rendering the component
- ReactDOM.render(, client.mountElement);
+ const root = createRoot(client.mountElement);
+ root.render();
}