I am using v5 of react-router-dom.
npm ls --depth=0 | grep 'react-router-dom'
├── @types/react-router-dom@5.3.2
├── react-router-dom@5.3.0
However, I get an error like the type definition refers to v6.
Type '{ exact: true; path: string; component: FC<{}>; }' is not assignable to type 'IntrinsicAttributes & (PathRouteProps | LayoutRouteProps | IndexRouteProps)'.
Property 'exact' does not exist on type 'IntrinsicAttributes & (PathRouteProps | LayoutRouteProps | IndexRouteProps)'. TS2322
93 | </Header>
94 | <ContentBody>
> 95 | <Route exact path="/" component={TopPage} />
| ^
96 | </ContentBody>
97 | </Content>
98 | </Container>
I would like to know how to avoid this without updating to v6.