Skip to content

Parent refs are empty in child componentWillUnmount #1853

@joshma

Description

@joshma

I believe I have a repro of this bug here: http://jsfiddle.net/joshma/t68Nv/5/

I ran into it when my child component called a passed-in handler to clean up during its componentWillUnmount, triggered while the parent was unmounting as well. This handler, belonging to the parent, tries to pause the parent's audio node, but this.refs.audioNode was already empty. (For what it's worth, when I inserted a breakpoint the DOM node is still there.)

I mentioned this on IRC and @zpao suggested it might be a bug, so here I am. :)

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