浏览代码

docs: remove extra braces in callback JSX (#8087)

Fix: Syantax error
Sunil 1 年之前
父节点
当前提交
63dee03ef0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      dev-docs/docs/@excalidraw/excalidraw/api/props/excalidraw-api.mdx

+ 1 - 1
dev-docs/docs/@excalidraw/excalidraw/api/props/excalidraw-api.mdx

@@ -13,7 +13,7 @@ Once the callback is triggered, you will need to store the api in state to acces
 ```jsx showLineNumbers
 export default function App() {
   const [excalidrawAPI, setExcalidrawAPI] = useState(null);
-  return <Excalidraw excalidrawAPI={{(api)=> setExcalidrawAPI(api)}} />;
+  return <Excalidraw excalidrawAPI={(api)=> setExcalidrawAPI(api)} />;
 }
 ```