How to use Prompt in react-router V7? #13350
Unanswered
JinHe-PerkinElmer
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background:
Upgrade react-router from v5 to v7, Prompt component is gone. And unstable_usePrompt is not user-friendly. I got this error:
Uncaught Error: unstable_usePrompt must be used within a data router.
If users prefer Declarative Mode, how to implement Prompt function here?
PS:
I wrote a demo according to the official documentation unstable_usePrompt, based on data router, but there was no prompt when the route was changed.
Beta Was this translation helpful? Give feedback.
All reactions