title: React-Typescript: Module '"react-router-dom"' has no exported member 'RouteComponentProps'
body: <p>I have a project and with this project I have a login page and I want to use &quot;RouteComponentProps&quot;, but I got this error:</p>
  <pre><code>Module '&quot;react-router-dom&quot;' has no exported member 'RouteComponentProps'.
  </code></pre>
  <p>And I tried to import it via &quot;react-router&quot;, but it appeared to me:</p>
  <pre><code>Module '&quot;react-router&quot;' has no exported member 'RouteComponentProps'.
  </code></pre>
  <p>How can I solve the problem?</p>
  <p>This is part of the file I used &quot;RouteComponentProps&quot;:</p>
  <p>signin.tsx:</p>
  <pre><code>import { RouteComponentProps } from 'react-router-dom';
  
  interface Props {
    history: RouteComponentProps['history']
  }
  </code></pre>
  <p>package.json:</p>
  <pre><code>{
    &quot;name&quot;: &quot;my-app&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@material-ui/core&quot;: &quot;^4.12.3&quot;,
      &quot;@material-ui/icons&quot;: &quot;^4.11.2&quot;,
      &quot;@material-ui/styles&quot;: &quot;^4.11.4&quot;,
      &quot;@reach/router&quot;: &quot;^1.3.4&quot;,
      &quot;@testing-library/jest-dom&quot;: &quot;^5.11.4&quot;,
      &quot;@testing-library/react&quot;: &quot;^11.1.0&quot;,
      &quot;@testing-library/user-event&quot;: &quot;^12.1.10&quot;,
      &quot;@types/jest&quot;: &quot;^26.0.24&quot;,
      &quot;@types/node&quot;: &quot;^12.20.37&quot;,
      &quot;@types/react&quot;: &quot;^17.0.37&quot;,
      &quot;@types/react-dom&quot;: &quot;^17.0.11&quot;,
      &quot;@types/react-redux&quot;: &quot;^7.1.20&quot;,
      &quot;axios&quot;: &quot;^0.24.0&quot;,
      &quot;history&quot;: &quot;^5.1.0&quot;,
      &quot;react&quot;: &quot;^17.0.2&quot;,
      &quot;react-dom&quot;: &quot;^17.0.2&quot;,
      &quot;react-redux&quot;: &quot;^7.2.6&quot;,
      &quot;react-router&quot;: &quot;^6.1.1&quot;,
      &quot;react-router-dom&quot;: &quot;^6.1.1&quot;,
      &quot;react-scripts&quot;: &quot;4.0.3&quot;,
      &quot;redux&quot;: &quot;^4.1.2&quot;,
      &quot;redux-devtools-extension&quot;: &quot;^2.13.9&quot;,
      &quot;redux-thunk&quot;: &quot;^2.4.1&quot;,
      &quot;thunk&quot;: &quot;0.0.1&quot;,
      &quot;typescript&quot;: &quot;^4.5.2&quot;,
      &quot;web-vitals&quot;: &quot;^1.0.1&quot;
    },
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;react-scripts start&quot;,
      &quot;build&quot;: &quot;react-scripts build&quot;,
      &quot;test&quot;: &quot;react-scripts test&quot;,
      &quot;eject&quot;: &quot;react-scripts eject&quot;
    },
    &quot;eslintConfig&quot;: {
      &quot;extends&quot;: [
        &quot;react-app&quot;,
        &quot;react-app/jest&quot;
      ]
    },
    &quot;browserslist&quot;: {
      &quot;production&quot;: [
        &quot;&gt;0.2%&quot;,
        &quot;not dead&quot;,
        &quot;not op_mini all&quot;
      ],
      &quot;development&quot;: [
        &quot;last 1 chrome version&quot;,
        &quot;last 1 firefox version&quot;,
        &quot;last 1 safari version&quot;
      ]
    },
    &quot;devDependencies&quot;: {
      &quot;@types/react-router&quot;: &quot;^5.1.17&quot;,
      &quot;@types/react-router-dom&quot;: &quot;^5.3.2&quot;,
      &quot;miragejs&quot;: &quot;^0.1.43&quot;
    }
  }
  </code></pre>