Skip to content

Commit 7a0cba7

Browse files
Remove deprecated render
1 parent d45d2ec commit 7a0cba7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/js/src/index.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ReactPyDjangoClient } from "./client";
22
import React from "react";
3-
import { render } from "react-dom";
3+
import { createRoot } from "react-dom";
44
import { Layout } from "@reactpy/client/src/components";
55

66
export function mountComponent(
@@ -77,5 +77,6 @@ export function mountComponent(
7777
}
7878

7979
// Start rendering the component
80-
render(<Layout client={client} />, client.mountElement);
80+
const root = createRoot(client.mountElement);
81+
root.render(<Layout client={client} />);
8182
}

0 commit comments

Comments
 (0)