diff --git a/dev-docs/docs/@excalidraw/excalidraw/integration.mdx b/dev-docs/docs/@excalidraw/excalidraw/integration.mdx index 1fdcb8d8..7080c32e 100644 --- a/dev-docs/docs/@excalidraw/excalidraw/integration.mdx +++ b/dev-docs/docs/@excalidraw/excalidraw/integration.mdx @@ -34,14 +34,16 @@ function App() { Since _Excalidraw_ doesn't support server side rendering, you should render the component once the host is `mounted`. +The following worfklow shows one way how to render Excalidraw on Next.js. We'll add more detailed and alternative Next.js examples, soon. + ```jsx showLineNumbers import { useState, useEffect } from "react"; export default function App() { - const [Comp, setComp] = useState(null); + const [Excalidraw, setExcalidraw] = useState(null); useEffect(() => { - import("@excalidraw/excalidraw").then((comp) => setComp(comp.default)); + import("@excalidraw/excalidraw").then((comp) => setExcalidraw(comp.Excalidraw)); }, []); - return <>{Comp && }; + return <>{Excalidraw && }; } ```