範例邊緣自訂邊緣自訂邊緣React Flow 提供四種不同的邊緣類型 - default (貝茲曲線), straight, step 和 smoothstep。如果您需要在邊緣進行特殊的路由或控制,也可以建立自訂邊緣。在此範例中,我們將示範如何實作具有按鈕、雙向邊緣和自我連接邊緣的邊緣。在所有範例中,我們都使用 BaseEdge 元件作為輔助工具。index.htmlApp.tsxexport default function App() { const data: string = "world" return <h1>Hello {data}</h1> } 唯讀在 Stackblitz 中開啟在 Codesandbox 中開啟功能概述深色模式