import { ErrorBoundary } from 'react-error-boundary';
import { Switch, Route, BrowserRouter } from 'react-router-dom';
import Home from './pages/Home';
import Signin from './pages/Signin';
import Error from './pages/Error';
function App() {
return (
<ErrorBoundary FallbackComponent={Error}>
<BrowserRouter>
<Switch>
<Route exact path="/signin" component={Signin} />
<Route exact path="/" component={Home} />
</Switch>
</BrowserRouter>
</ErrorBoundary>
);
}
export default App;
TS2322: Type '{ exact: true; path: string; component: () => Element; }' is not assignable to type 'IntrinsicAttributes & (PathRouteProps | LayoutRouteProps | IndexRouteProps)'. Property 'exact' does not exist on type 'IntrinsicAttributes & (PathRouteProps | LayoutRouteProps | IndexRouteProps)'.
이런 타입에러가 나타납니다. 이럴땐 어떻게 해야할까요?
react-router-dom 버전은 5.3.0입니다.