title: React Use RouteComponentProps - Type '{}' is missing the following properties from type 'Readonly<RouteComponentProps<{}
body: <p>I am using React with Typescript and needs to use the history for that I need to have interface of RouteComponentProps</p>
  
  <pre><code>export default class Routes extends Component&lt;RouteComponentProps, any&gt; {
    render() {
     return (
      &lt;div&gt;
        &lt;Switch&gt;
          &lt;Route exact path="/" component={Home} /&gt;
          &lt;Route exact path="/login" component={Login} /&gt;
          &lt;ProtectedRoute exact path="/admin" component={Admin} /&gt;
        &lt;/Switch&gt;
      &lt;/div&gt;
    );
   }}
  </code></pre>
  
  <p>When I use the props interface as RouteComponentProps it gives me error at below code.</p>
  
  <pre><code>class App extends Component {
    render() {
     return (
       &lt;Provider&gt;
         &lt;React.Fragment&gt;
           &lt;Navbar /&gt;
           &lt;Routes /&gt;
         &lt;/React.Fragment&gt;
       &lt;/Provider&gt;
   );
  }
  }
  </code></pre>
  
  <p>Error comes when I try to use my Route Component. The error says</p>
  
  <p>Type '{}' is missing the following properties from type 'Readonly>': history, location, match  TS2739</p>
  
  <p>Kindly help in resolving this issue</p>