Skip to content

replace does not call componentWillUnmount for replaced component #36

@lrettig

Description

@lrettig

Hello

I'm using type="replace" for one of my routes. I noticed that, after I follow this route several times, I get the following warning:

(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. (Full stack trace)

I tested some more and it appears that this is happening because, while I remove the change listener in componentWillUnmount, this method is not called on a component that's being replaced.

How can I handle this, and know when my component is going away due to replace?

Thanks!

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