chore(examples): useCallback for useOnViewport handlers

This commit is contained in:
moklick
2022-08-16 15:49:45 +02:00
parent fc69860b9d
commit 87a9abfc6f
4 changed files with 12 additions and 6 deletions
@@ -17,6 +17,7 @@ function useOnViewportChange({ onStart, onChange, onEnd }: UseOnViewportChangeOp
}, [onStart]);
useEffect(() => {
console.log('change onchange');
store.setState({ onViewportChange: onChange });
}, [onChange]);
+1
View File
@@ -44,6 +44,7 @@
.react-flow__connection-path {
stroke: #b1b1b7;
stroke-width: 1;
fill: none;
}
.react-flow__edge {