We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
render
1 parent d45d2ec commit 7a0cba7Copy full SHA for 7a0cba7
src/js/src/index.tsx
@@ -1,6 +1,6 @@
1
import { ReactPyDjangoClient } from "./client";
2
import React from "react";
3
-import { render } from "react-dom";
+import { createRoot } from "react-dom";
4
import { Layout } from "@reactpy/client/src/components";
5
6
export function mountComponent(
@@ -77,5 +77,6 @@ export function mountComponent(
77
}
78
79
// Start rendering the component
80
- render(<Layout client={client} />, client.mountElement);
+ const root = createRoot(client.mountElement);
81
+ root.render(<Layout client={client} />);
82
0 commit comments