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

Notifying transitioned component that transition has started (instead of ComponentWillUnmount) #128

Open
doron-au10tix opened this issue Jul 25, 2021 · 0 comments

Comments

@doron-au10tix
Copy link

Hi,

I've added this great package to an existing project where "componentWillUnmount" was used to clean all kinds of resources / listeners.
Problem is, now, in my flow, an action occurs, which navigates the user outside of the Component, but a re-render also happens. Usually, without the animation, the component would immediately run "componentWillUnmount" and release all the need for re-renders..
But, now, during the animation bad / unexpcted things happen.

I suggest to add some hook / callback to each such "transitioned" component (e.g. "transitionStarted") to allow it to cleanup sooner, instead of using componentWillUnmount.

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

1 participant