react-animate-mount icon indicating copy to clipboard operation
react-animate-mount copied to clipboard

Feature Request: Add `leave` prop to slide out when the `Animate` component is removed

Open JosephScript opened this issue 5 years ago • 0 comments

Is it feasible to add a leave prop to the Animate component? I have a 3rd party component that controls the mount and unmount of my Animate component, and if I had a way to animate it out on unmount this would be perfect!

<HOC
    name="email"
    component={<Animate appear leave show>}
/>

This is equivalent to:

{error.email ? <Animate appear leave show>{error.email}</div> : null}

Once the object is populated the Animate animates in perfectly. However, I can't figure out a way to Animate it again on unmount. Thanks!

JosephScript avatar May 21 '19 17:05 JosephScript