title: How to detect route change in microfrontend app
body: <p>I have microfrontend app consisting of two react projects let's call them A and B and if a user clicks a certain link in A project then url is changed. But how can I detect url change in project B. Now I have componentDidUpdate function which checks current location.pathname with previous one. But componentDidUpdate is run only when url is changed within A or B.</p>
  <pre><code>    componentDidUpdate(prevProps) {
          const {
            location,
          } = this.props;
          if (location.pathname.includes('/messages/inbox/') &amp;&amp; prevProps.location.pathname !== location.pathname) {
            ...logic code
          }
  }
  </code></pre>