-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for react router v6 #81
Comments
@jmdsg thanks for opening this issue! If you or someone else wants to open a PR for v6, I'll merge! However, I do not plan to dev it myself. |
@jmdsg @ZacharyRSmith Is there any update for this issue ? |
@shamilykr no. If you can, please open a PR. Thanks! |
Try this package if it helps |
yoo it was really helpful. |
don't really want to be annoying but is it hard to trigger on closing the tap or reloading it😢 |
@notShadowM , when you wrote "it hard to trigger on closing the tap or reloading itcry", were you writing about this pkg, react-router-navigation-prompt, or react-router-prompt? If this pkg, thanks for the feedback! Would you please provide more details? |
@ZacharyRSmith |
Navigation away from your site, reload, or closing tab/window will also prompt navigation confirmation when 's props.when is truthy. However, for security concerns browsers usually handle this navigation UX themselves, leading to vanilla alert boxes. Also, many browsers require users to interact with your site before confirming navigation away.
This pkg, react-router-navigation-prompt, now works for v6? So we can close this GitHub issue? |
@ZacharyRSmith |
Thanks for the info! |
I would like to know if there is a plan to support react router v6.
I checked the source code of this project, and also the migration guide from v5 to v6, and think the only changes needed would be:
withRouter
since is not avaibale anymore.useLocation
hook or receive it as a parameterReact router seems to be working on
usePrompt
anduseBlocker
, but those are not yet done. Meanwhile people that updates to v6, will not be able to use those nor this package.The text was updated successfully, but these errors were encountered: