react-native-animatable
react-native-animatable copied to clipboard
An option to make Animatable Components not animate on mount
I have something like this:
const MyComponent = ({ isShown }) => (
<Animatable.View
animation={isShown ? 'fadeInUp' : 'fadeOutDown'}
>
<ContentHere />
</Animatable.View>
);
The goal here is to make MyComponent show and hide itself according to the isShown prop. The problem is that Animatable.View animates when it's mounted so when I render <MyComponent isShown={false}> the user sees the component appear and fade out.
Could we add a prop to Animatable Components to make them initially render a completed animation (in this example, a completed fadeOutDown) so they don't animate on mount, but only when animation prop changes?
What's the status for this ticket ? this looks like a common use-case when using animatable library.
Any updates here?