stop dragging after a limit has reached
问题 I am using react native gesture handlers to create a bar that can be scrolled up and down. Currently I can scroll it as much as I want. I want to modify it such that it should stop scrolling when I certain limit has reached. export const SwipeablePanel: React.FunctionalComponent = () => { //set up animation variables const dragY = useRef(new Animated.Value(0)); const onGestureEvent = Animated.event( [{ nativeEvent: { translationY: dragY.current } }], { useNativeDriver: true, }, ); const