title: useLocation throwing Object is not a function
body: <p>Trying to use the <code>useLocation</code> hooks introduced in react-router-dom 5.1 but throws an error - Object is not a function .</p>
  <p>I have pasted a gist of my code below</p>
  <p>Using</p>
  <p>react - 16.13</p>
  <p>react-router-dom - 5.2.0</p>
  <p>App.js</p>
  <pre><code>&lt;Router&gt;
    &lt;Switch&gt;
      &lt;Redirect exact from='/' to='/home' /&gt;
      &lt;Route id='home' path='/home' component={Home} /&gt;
  
    &lt;/Switch&gt;
  &lt;/Router&gt;
  </code></pre>
  <p>Home.js</p>
  <pre><code>import { useLocation } from 'react-router-dom';
  
  function Home() {
    const [loc] = useLocation(); // throwing an error here
    console.log('ProductList -&gt; loc', loc);
    
     return &lt;div&gt;Home&lt;/div&gt;
  }
  </code></pre>
  <pre><code>Home.js:81 Uncaught TypeError: Object is not a function
      at PodList (Home.js:81)
      at renderWithHooks (react-dom.development.js:14803)
      at mountIndeterminateComponent (react-dom.development.js:17482)
      at beginWork (react-dom.development.js:18596)
      at HTMLUnknownElement.callCallback (react-dom.development.js:188)
      at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
      at invokeGuardedCallback (react-dom.development.js:292)
      at beginWork$1 (react-dom.development.js:23203)
      at performUnitOfWork (react-dom.development.js:22154)
      at workLoopSync (react-dom.development.js:22130)
      at performSyncWorkOnRoot (react-dom.development.js:21756)
      at scheduleUpdateOnFiber (react-dom.development.js:21188)
      at updateContainer (react-dom.development.js:24373)
      at react-dom.development.js:24758
      at unbatchedUpdates (react-dom.development.js:21903)
      at legacyRenderSubtreeIntoContainer (react-dom.development.js:24757)
      at Object.render (react-dom.development.js:24840)
      at Module../src/index.js (index.js:19)
      at __webpack_require__ (bootstrap:789)
      at fn (bootstrap:150)
      at Object.1 (utils.js:418)
      at __webpack_require__ (bootstrap:789)
      at checkDeferredModules (bootstrap:45)
      at Array.webpackJsonpCallback [as push] (bootstrap:32)
      at main.chunk.js:1
  </code></pre>