I am making a bottom sheet in react-native with the help of react-native-reanimated2 and react-native-Gesture-handler. But when I use withTiming or withSpring it makes the Animated.view jump up and down a tiny bit. Any configurations I should make to make it stop having a "laggy" effect?
const scrollTo = useCallback((destination) => {
'worklet';
// translateY.value = destination
translateY.value = withTiming(destination, { damping: 50, mass:0.5, })
}, []);
Which is used in another component. and that component acts weird when withSpring or withTiming is used. but not when just dragging.
const rBottomSheetStyle = useAnimatedStyle(() => {
const height = interpolate(
translateY.value + 75,
[0, MAX_TRANSLATE_Y],
[0, -MAX_TRANSLATE_Y],
);
return {
height,
};
})