-
Would it be possible to implement something similar to react-router's Prompt in wouter? I'm just getting started migrating from react-router to wouter but this is a feature we use in r-r. |
Beta Was this translation helpful? Give feedback.
Answered by
molefrog
Apr 18, 2023
Replies: 1 comment 2 replies
-
Hi! It's not supported atm, but here is a short example of how it can be achieved: The beauty of wouter is interchangeable location hook, and it is an extension point to cover a lot of use cases similar to this one. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
molefrog
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! It's not supported atm, but here is a short example of how it can be achieved:
https://codesandbox.io/s/wouter-interruptible-transition-using-router-6o7lx?file=/src/index.js
The beauty of wouter is interchangeable location hook, and it is an extension point to cover a lot of use cases similar to this one.