I am having trouble using the EXACT property for my routes, I am using React 18
import { BrowserRouter, Route } from 'react-router-dom';
import Landing from './pages/Landing'
import FanbaseMap from './pages/FanbaseMap'
function Routes() {
return (
<BrowserRouter>
<Route exact path="/">
<Landing />
</Route>
<Route exact path="/map">
<FanbaseMap />
</Route>
</BrowserRouter>
);
}
Type '{ children: Element; exact: true; path: string; }' is not assignable to type 'IntrinsicAttributes & RouteProps'. Property 'exact' does not exist on type 'IntrinsicAttributes & PathRouteProps'.
I need to create routes that direct to an exact page using React and react-router-dom.