title: Upgrading react-router-dom from 4 to 5
body: <p>I'm in the process of upgrading several packages in a react/redux app and one of them is react-router-dom (from 4.x to 5.x). The documentation I've seen is that 5.x is backwards compatible with 4 but I'm running into an issue where context.router is not being passed into the constructor of the Route Component they way it was in version 4.
  The legacy code is using the  tag as opposed to the  tag. In the near term I 'm attempting to minimize the number of changes and was trying to maintain use of the  tag, with the intention of switching over to  at some point later.</p>
  <p><br/>Version 5 console log:
  <a href="https://i.stack.imgur.com/1OCvN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1OCvN.png" alt="enter image description here" /></a></p>
  <p>Version 4 console.log:
  <a href="https://i.stack.imgur.com/fMg5T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fMg5T.png" alt="enter image description here" /></a></p>
  <p>Render function that contains the Router, Route and Switch tags:</p>
  <pre><code>/**
   * Top level Container
   */
  class App extends React.Component {
    /**
     * Render the entire app
     * @return {jsx} result in jsx format
    */
    render() {
      return (
        &lt;ConfigProvider locale={enUS}&gt;
          &lt;Router history={history}&gt;
            &lt;div&gt;
              &lt;Header /&gt;
              &lt;Notifications /&gt;
              &lt;Switch&gt;
                &lt;Route exact path={home} component={requireAuth(Groups)} /&gt;
                &lt;Route exact path={groups} component={requireAuth(Groups)} /&gt;
                &lt;Route path={addcard} component={requireAuth(AddCard)} /&gt;
                &lt;Route path={db} component={requireAuth(DbTbl)} /&gt;
                &lt;Route path={cards} component={requireAuth(Cards)} /&gt;
                &lt;Route path={card} component={requireAuth(EditCard)} /&gt;
                &lt;Route path={test} component={requireAuth(Test)} /&gt;
                &lt;Route path={users} component={requireAuth(Users)} /&gt;
                &lt;Route path={signin} component={authenticatedUser(Signin)} /&gt;
                &lt;Route path={signup} component={authenticatedUser(Signup)} /&gt;
                &lt;Route path={responses} component={requireAuth(Responses)} /&gt;
                &lt;Route path={study} component={requireAuth(Study)} /&gt;
                &lt;Route component={NoMatch} /&gt;
              &lt;/Switch&gt;
            &lt;/div&gt;
          &lt;/Router&gt;
        &lt;/ConfigProvider&gt;
      );
    };
  }
  </code></pre>