Skip to content

Broken animation finishing after unmounting #12

@xStrom

Description

@xStrom

If ReactTransitionGroup is unmounted before all its animations have finished a javascript error is thrown complaining about reading properties of undefined.

Specifically the callbacks _handleDoneAppearing, _handleDoneEntering, _handleDoneLeaving have:

let component = this.childRefs[key];
// The following line (and its analogues) will throw with:
// Uncaught TypeError: Cannot read property 'componentDidLeave' of undefined
if (component.componentDidLeave) {

This bug is especially common with long running animations, however it can also happen with short animations if the timing is right.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions