Relative Content

Tag Archive for reactjstypescriptreact-router-dom

useBlocker in react-router-dom not letting me click on links even after dismissing the modal

I have the following code to show a prompt to the user to confirm if they want to navigate away from the order form. After recent changes to the other parts of the app which were significant, after dismissing the user is taken to another page but they cannot click on any <Link>. Anyone have similar experience? What am I doing wrong here. Using React 17 react-dom latest.

How to use layout and provider in the same page?

I have provider which makes a request to the server to refresh a token and has some values. Also I have a simple layout with a sidebar. I wanna use them only in one route. Idk where to add the layout and I’ve already used Outlet in the provider