vuejs / router

🚦 The official router for Vue.js
https://router.vuejs.org/
MIT License
3.77k stars 1.16k forks source link

Sallow routing #2086

Closed the-pesar closed 7 months ago

the-pesar commented 7 months ago

What problem is this solving

I saw shallow routing feature in React and SvelteKit, but it's strange to me why we don't have this important feature in Vue-router! I think you are familiar enough with this feature that there is no need for me to explain.

Proposed solution

Routing without navigation.

posva commented 7 months ago

You can already do history.pushState or replaceState. Most of the times the goal is to add state to the history entry and this can be achieved when pushing with the state option. Note there is an example for modals as an e2e test in this repo, in case that’s what you are looking for