digital-flowers / react-animated-css

React component to show or hide elements with animations
https://digital-flowers.github.io/react-animated-css.html
232 stars 36 forks source link

animationOut not working #36

Open anilv0001 opened 4 years ago

anilv0001 commented 4 years ago

Hey , I m using the zoomIn and ZoomOut the issue is zoomOut is not working here is the my code snippet <Animated animationIn="zoomIn" animationOut="zoomOut" animationInDuration={700} animationOutDuration={700} isVisible={this.state.bootboxmodal}

ariel-frischer commented 4 years ago

I'm having the same issue.

EDIT: I manually made the animationOut trigger by setting isVisible to false;

cgcullen commented 4 years ago

I'm not having any luck getting animationOut to work either. I have a component that is triggered by a state variable but this is not working:

     ```
     const [jobInfoOpen, setJobInfoOpen] = useState(false)

     <Animated
        animationIn="fadeInRight"
        animationOut="fadeOutLeft"
        isVisible={jobInfoOpen}
      >
          <JobInfo setJobOpen={setJobInfoOpen} />
      </Animated>


animationIn works fine, but not animationOut

A button elsewhere in the code sets jobInfoOpen to true.
A button inside the JobInfo component sets setJobInfoOpen to false.
ariel-frischer commented 3 years ago

@cgcullen Maybe try adding animationInand animationOutduration attributes.