ItalyPaleAle / svelte-spa-router

Router for SPAs using Svelte 3
MIT License
1.53k stars 105 forks source link

FEATURE REQUEST: pass next() in precondition to decide whether the router should *change* the current route #304

Open sallliisa opened 1 year ago

sallliisa commented 1 year ago

The current model of the router is regardless of the route passed the pre-condition of each of the route, the actual route still changes. It would be nice and much more coherent i think if I could decide whether to go to the next route or not based off of the precondition that I defined.

ItalyPaleAle commented 1 year ago

This can't really be stopped because the navigation happens in the browser. The router can only react to that.

More discussion here: https://github.com/ItalyPaleAle/svelte-spa-router/issues/112