onAnimationBegin and onAnimationEnd doesn't work. They are not fired

Author: renanbronchartCreated May 4, 2022Updated Jan 9, 2024

onAnimationBegin and onAnimationEnd doesn't work.

My animation is fired, and it works perfectly, but callback are not fired.

      <Animatable.View
        transition={["maxHeight", "paddingVertical"]}
        duration={150}
        delay={500}
        easing="ease-out-cubic"
        onAnimationEnd={() => { console.log('finish animation')}}
        onAnimationBegin={() => { console.log('begin animation')}}
        style={[
          styles.postWrapper,
          {
            maxHeight: isRemoved ? 0 : 1000,
            paddingVertical: isRemoved ? 0 : 16
          }
        ]}
      >
    ```

Source: oblador/react-native-animatable