You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when I run this code I get Error handled by React Router default ErrorBoundary: Error..
If I remove the useBlocker in the custom hook then the app will work fine
Expected Behavior
Hopefully useBlocker works
Actual Behavior
application running exception
The text was updated successfully, but these errors were encountered:
What version of React Router are you using?
6.22.3
Steps to Reproduce
I create some routes with createBrowserRouter()
Example code like this :
And I wrapped useBlock in a useUnSavedChangesWarning hook, the hook like this:
then I use useUnSavedChangesWarning hook in DefaultLayout
However, when I run this code I get Error handled by React Router default ErrorBoundary: Error..
If I remove the useBlocker in the custom hook then the app will work fine
Expected Behavior
Hopefully useBlocker works
Actual Behavior
application running exception
The text was updated successfully, but these errors were encountered: