Skip to content
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

Implement prompts #46

Closed
wants to merge 1 commit into from
Closed

Implement prompts #46

wants to merge 1 commit into from

Conversation

iluuu1994
Copy link

Closes #45

Here's a POC. It's not the prettiest code ever but it handles all the cases described. Tests are also missing, I'll add these shortly.

Let me know if you think this approach is viable or if I need to change something fundamentally.

@iluuu1994
Copy link
Author

Any feedback?

@iluuu1994
Copy link
Author

Switched to Routify.

@iluuu1994 iluuu1994 closed this Nov 12, 2021
@Maqsim
Copy link

Maqsim commented Jan 25, 2023

@iluuu1994 Hi. I also faced this issue now. If svelte-navigator can't handle this then I need another router. How did you manage to solve this via Routify? Is it for SPA or SSR apps?

@iluuu1994
Copy link
Author

@Maqsim You can use the $beforeUrlChange callback.

https://www.routify.dev/docs/helpers#before-url-change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prompt for unsaved forms
2 participants