Reactjs – UseLocation error despite wrapping the component in the router tag
Im new to react routers and currently using the BrowserRouter from react-router-dom with the version react-router-dom": "^6.21.0" Im using the useLocation() to dynmaically set a store variable whenever the path changes. Here is what im doing: App.tsx: function App() {…