refactor: performance

This commit is contained in:
2026-03-12 21:01:43 +01:00
parent 92fdba7eef
commit 029bab8917
9 changed files with 109 additions and 47 deletions

View File

@@ -82,7 +82,7 @@ export function useAbstractNode<TData = Record<string, unknown>>(
): AbstractNodeContext<TData> {
const graphCtx = useContext(GraphContext)
const pathCtx = useContext(ConnectionPathContext)
const nodes = graphCtx?.nodes ?? []
const nodes = graphCtx?.graphRef?.current?.nodes ?? []
const edges = graphCtx?.edges ?? []
const setNodes = graphCtx?.setNodes
const setEdges = graphCtx?.setEdges