Skip to content

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

@doron-au10tix

Description

@doron-au10tix

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions