I use TS and now i have to put stuff in my Router and I don't know what.
index.js:
import { Router, useLocation } from "react-router-dom";
const root = ReactDOM.createRoot(
document.getElementById("root") as HTMLElement
);
const location = useLocation()
root.render(
<React.StrictMode>
<Router location={????????} navigator={?????????} >
<App />
</Router>
</React.StrictMode>
);
reportWebVitals();
App.js:
function App() {
return (
<>
<Navbar />
<Routes >
<Route path="/" element={<Home />} />
<Route path="Portfolio/:portfolioId" element={<SingleShooting />} />
...
</Routes>
</>
);
}
WHat do I have to put in?
Type '{ children: Element; }' is missing the following properties from type 'RouterProps': location, navigatorts(2739)
(I want to do this, because of this: Animate Presence exit not working framer motion)