React-router errorElement not catching errors on child routes (from within a function)
I am using React router dom version 6.25.1.
The “useHistory” (history.listen) method is not available in the React router dom v6
I am using React router dom v6, and the “useHistory” method is not available in the React router v6 version.
How to programmatically navigate using React Router dom in vs?
With react-router I can use the Link element to create links which are natively handled by react router. I see internally it calls this.context.transitionTo(). I want to do a navigation. …
React RouterDom doesnt work on outlet and subroutes
I have this following route config
How can you conditionally render components on a page and use routing together?
I took a previously working page that conditionally rendered components and tried to add routing via react-routerv6. It’s neither updating the URI nor the page when I try to change the selectedComponent via the webpage. I’m not getting an error in the console during build or chrome console. Is the problem that I’m trying to use routing on a component within App.js?
How to prevent scroll-to-top on certain links in React Router with a custom ScrollToTop component
I’m using React Router with a custom ScrollToTop component to reset the scroll position to the top of the page on navigation. However, I have a specific use case where I need the scroll position to stay the same when clicking on category item.
I have been trying to implement the unstable_usePrompt , but it’s been giving me an error: useBlocker must be used within a data router
I am working on a multipage Spa , so while working on a form and trying to stop information from been lost if the user clicks on the previous page , I have been getting an error useBlocker must be used within a data router and am actually using an unstable_usePrompt. Can someone please help me out.
react router dom useNavigation + Pagination
i implementing pagination using nested routing.
div not rendering react-router-dom
I’m trying to add a react component to a webpage following this documentation: https://react.dev/learn/add-react-to-an-existing-project
Mixing useNavigate with useHistory in React
In my current workplace, the project that I am supposed to work on has used useHistory up to now. I know that in newer versions it is usually better to use useNavigate. Would it be okay (non-breaking) to start using useNavigate inside of my new components without changing the older components to use useNavigate.