diff --git a/src/AnimatedLineGraph.tsx b/src/AnimatedLineGraph.tsx index 08f2bc4..eedaf83 100644 --- a/src/AnimatedLineGraph.tsx +++ b/src/AnimatedLineGraph.tsx @@ -203,7 +203,9 @@ export function AnimatedLineGraph({ useAnimatedReaction( () => x.value, (fingerX) => { - runOnJS(setFingerX)(fingerX) + if (isActive.value) { + runOnJS(setFingerX)(fingerX) + } }, [isActive, setFingerX, width, x] )