diff --git a/example/app.jsx b/example/app.jsx
index 3279741..637a7fa 100644
--- a/example/app.jsx
+++ b/example/app.jsx
@@ -1,5 +1,5 @@
import React, { Fragment, useState, useCallback, useMemo } from "react";
-import { render } from "react-dom";
+import { createRoot } from "react-dom/client";
import { ReactP5Wrapper } from "../src/index.tsx";
import * as box from "./sketches/box";
import * as torus from "./sketches/torus";
@@ -70,4 +70,6 @@ function App() {
);
}
-render(, document.getElementById("app"));
+const container = document.getElementById("app");
+const root = createRoot(container);
+root.render();