cancelAnimation
cancelAnimation
lets you cancel a running animation paired to a shared value.
Reference
import { cancelAnimation } from 'react-native-reanimated';
function App() {
const offset = useSharedValue(100);
const handleCancel = () => {
cancelAnimation(offset);
};
}


Type definitions
type SharedValue<T> = { value: T };
function cancelAnimation<T>(sharedValue: SharedValue<T>): void;