refactor: performance
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user