mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
docs: fix Browser integration example React import
This commit is contained in:
parent
58f7d33d80
commit
3af9d99ee4
1 changed files with 2 additions and 2 deletions
|
@ -208,7 +208,7 @@ import TabItem from "@theme/TabItem";
|
|||
// See https://www.npmjs.com/package/@excalidraw/excalidraw documentation.
|
||||
import * as ExcalidrawLib from 'https://esm.sh/@excalidraw/excalidraw@0.18.0/dist/dev/index.js?external=react,react-dom';
|
||||
import React from "https://esm.sh/react@19.0.0";
|
||||
import ReactDOM from "https://esm.sh/react-dom@19.0.0"
|
||||
import { createRoot } from "https://esm.sh/react-dom@19.0.0/client";
|
||||
|
||||
window.ExcalidrawLib = ExcalidrawLib;
|
||||
console.log("Excalidraw library", ExcalidrawLib);
|
||||
|
@ -228,7 +228,7 @@ const App = () => {
|
|||
};
|
||||
|
||||
const excalidrawWrapper = document.getElementById("app");
|
||||
const root = ReactDOM.createRoot(excalidrawWrapper);
|
||||
const root = createRoot(excalidrawWrapper);
|
||||
root.render(React.createElement(App));
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue