title: Multiple event listeners in Next.js router
body: <p>Currently <code>next/router</code> exposes a singleton API where listening to its changes can be done via:</p>
  
  <pre><code>Router.onRouteChangeStart = myHandler // subscribe
  
  Router.onRouteChangeStart = null // unsubscribe
  </code></pre>
  
  <p>This poses several architecture-related challenges as two unrelated components can't listen to route state changes at the same time.</p>
  
  <p>Based on the discussion on <a href="https://github.com/zeit/next.js/issues/2033" rel="nofollow noreferrer">https://github.com/zeit/next.js/issues/2033</a> there is no plan to convert <code>next/router</code> to an Event Emitter / Observable.</p>
  
  <p>Given that, how can we implement a router with shared subscriptions in Next.js?</p>