further reduce unnecessary re-renders

This commit is contained in:
Joeri Exelmans 2025-10-23 22:00:45 +02:00
parent 2ca2ba5d1b
commit 87ceaa1220
5 changed files with 40 additions and 26 deletions

View file

@ -755,10 +755,10 @@ export const VisualEditor = memo(function VisualEditor({state, setState, setAST,
return <ArrowSVG
key={arrow.uid}
arrow={arrow}
selected={selection.find(a => a.uid === arrow.uid)?.parts || []}
errors={errors
selected={selection.find(a => a.uid === arrow.uid)?.parts as ArrowPart[] || []}
error={errors
.filter(({shapeUid}) => shapeUid === arrow.uid)
.map(({message}) => message)}
.map(({message}) => message).join(', ')}
highlight={arrowsToHighlight.hasOwnProperty(arrow.uid)}
fired={highlightTransitions.includes(arrow.uid)}
arc={arc}