'React-native animation lagging on android

I'm using the Reanimated library(2.2.0), and I have a fairly simple animation to expand a Animated.View , that I call when pressing a TouchableOpacity:

    height.value = withTiming(calculatedHeight, {
      duration: 300,
      easing: Easing.inOut(Easing.ease),
    });

On IOS is running very nice on 60fps, but on some Android phones like Samsung S20,S21 Ultra, the animation is lagging a lot. I tried it on an older Samsung(A5) and on it is running fine again. Any suggestions are appreciated.



Solution 1:[1]

Animate the Y scale instead of the height. left top width height are slow

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 IceSoul