Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

componentDidTransition #53

Closed
jamesplease opened this issue May 7, 2017 · 4 comments
Closed

componentDidTransition #53

jamesplease opened this issue May 7, 2017 · 4 comments

Comments

@jamesplease
Copy link
Contributor

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

There are no callbacks when the transition ends.

More detail

Sometimes, you want to do something once an animation completes. I think it makes sense for this lib to provide this callback.

This was originally raised on the React repo here: facebook/react#5914

And a PR was made here: facebook/react#5915

I've been using a copypasta'd version of ReactTransitionGroup that adds this feature for a long time now, and it works great. I think the general approach is good; it just wasn't merged in because Facebook didn't want to maintain this lib (see facebook/react#5914 (comment) )

For more on the justification, you can read the initial issue. But also you can imagine other cases where you might want to do some action after an animation completes.

@acusti
Copy link

acusti commented May 11, 2017

I would also find this useful. Would the current maintainers be amenable to someone creating a new PR based on facebook/react#5915 for this repo? If so, I’d be happy to do so.

@jquense
Copy link
Collaborator

jquense commented May 11, 2017

The likely answer here is that this is covered by the proposed be API in #24 I'd check there and see if that works for your usecase

@acusti
Copy link

acusti commented May 11, 2017

@jquense That’s exciting! The

onEnter: PropTypes.func,
onEntering: PropTypes.func,
onEntered: PropTypes.func,

onExit: PropTypes.func,
onExiting: PropTypes.func,
onExited: PropTypes.func,

hooks on the CSSTransition component would definitely do the trick for me! @jmeas Are you able to tell from the PR description + files changed diff if #24 would be enough for your needs as well?

Related, should this issue stay open to track this particular need until that PR is merged, or should it be closed?

@jamesplease
Copy link
Contributor Author

jamesplease commented May 11, 2017

It would. Thanks @jquense and @acusti!

Related, should this issue stay open to track this particular need until that PR is merged, or should it be closed?

I'll keep it open, but feel free to close @jquense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants