Removing react-router browserHistory change listener
<p>I've a react component that listens to route changes using browserHistory's listen method. After registering a handler with</p>

<pre><code>browserHistory.listen(this.handleRouteChanged)
</code></pre>

<p>in ComponentDidMount, how do I remove the listener in componentWillUnmount? </p>

<p>I can't find any documentation on this, and searching through github issues I've found suggestions using browserHistory.unregisterTransitionHook which doesn't seem to remove the listener, and in addition seems to be deprecated.</p>

<p>Any ideas?</p>