Closed pstoica closed 9 years ago
Can you give me an example snippet of your code please?
var hideOverlay = () => {
this.setState({
isOverlayShown: false,
isOverlayHiding: false
});
};
this.setState({ isOverlayHiding: true });
overlay.hideAnimation(hideOverlay);
hideOverlay is the onEnd function. This is kludgy and I read your animation gist afterwards. It would probably be better to use ReactTransitionGroup + react-tween-state for now instead of managing animated children like this?
@pstoica Oh geez sorry for the wait. I thought I had an email reminder for this but apparently not. #24 raised the same problem. It's now solved in a different way. You get to keep your sync callback, whatever the implications of that is.
I'll close this now. Can you try the new release (0.0.5)? If it doesn't work then reopen the issue please.
Sorry again!
No worries, that looks like a good fix. I'm pretty sure it'll work for my case. Thanks for your help!
I had a situation where I unmounted a component in the onEnd function. I was invoking the animation from a container. Maybe weird, but it works.
Anyway, this still runs after onEnd is invoked, causing a race condition since the component is unmounted:
This PR should fix this!