title: TypeError: props.history.listen is not a function. I am using ReactJS
body: <p>Why is this showing? I am using ReacJS and I can not see what is wrong.</p>
  <p><strong>My history.js:</strong></p>
  <pre><code>import { createBrowserHistory } from 'history'
  
  export default createBrowserHistory
  </code></pre>
  <p><strong>My App.js:</strong></p>
  <pre><code>import React from 'react'
  import { Router } from 'react-router-dom'
  
  import Routes from './routes'
  import history from './history'
  
  import './styles/global.scss'
  
  function App() {
    return (
      &lt;div className=&quot;App&quot;&gt;
        &lt;Router history={history}&gt;
          &lt;Routes/&gt;
        &lt;/Router&gt;
      &lt;/div&gt;
    );
  }
  
  export default App;
  </code></pre>