mefechoel / svelte-navigator

Simple, accessible routing for Svelte
Other
502 stars 39 forks source link

Implement prompts #46

Closed iluuu1994 closed 2 years ago

iluuu1994 commented 2 years ago

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 commented 2 years ago

Any feedback?

iluuu1994 commented 2 years ago

Switched to Routify.

Maqsim commented 1 year ago

@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 commented 1 year ago

@Maqsim You can use the $beforeUrlChange callback.

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