{"action":"closed","issue":{"url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/36","labels_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/36/comments","events_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/36/events","html_url":"https://github.com/aksonov/react-native-router-flux/issues/36","id":116836053,"number":36,"title":"replace does not call componentWillUnmount for replaced component","user":{"login":"lrettig","id":3316532,"avatar_url":"https://avatars.githubusercontent.com/u/3316532?v=3","gravatar_id":"","url":"https://api.github.com/users/lrettig","html_url":"https://github.com/lrettig","followers_url":"https://api.github.com/users/lrettig/followers","following_url":"https://api.github.com/users/lrettig/following{/other_user}","gists_url":"https://api.github.com/users/lrettig/gists{/gist_id}","starred_url":"https://api.github.com/users/lrettig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrettig/subscriptions","organizations_url":"https://api.github.com/users/lrettig/orgs","repos_url":"https://api.github.com/users/lrettig/repos","events_url":"https://api.github.com/users/lrettig/events{/privacy}","received_events_url":"https://api.github.com/users/lrettig/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-13T19:28:24Z","updated_at":"2015-12-07T17:46:47Z","closed_at":"2015-12-07T17:46:47Z","body":"Hello\r\n\r\nI'm using `type=\"replace\"` for one of my routes. I noticed that, after I follow this route several times, I get the following warning:\r\n\r\n`(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.` ([Full stack trace](http://i.imgur.com/bB7lHFw.png))\r\n\r\nI 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.\r\n\r\nHow can I handle this, and know when my component is going away due to `replace`?\r\n\r\nThanks!\r\n"}}