React Native: Animating when component is visible
I have a component which I am animating with Animated, my application is an tabbed application(I use react-native-navigation
) and I want to animate this component when it is shown in the screen, not when it mounts. I have tried starting animation on componentDidMount
and componentWillReceiveProps
but the problem is that the component is in the second tab and it is not visible when it mounts. How can I detect when this component becomes visible and animate it?