Exciting New Features for Routing in Vue3; Vue Router 4
summary
A full rewrite of Vue Router surfaces concrete changes: the library becomes tree-shakeable imports and exposes history factories like createMemoryHistory for SSR and custom platforms; path-to-regex is removed and a scoring algorithm orders routes so you can addRoute/removeRoute/getRoutes reliably; router-view accepts a route prop enabling modal-in-history UX; navigation failures become explicit values (not uncaught promise noise); scroll behavior, URL encoding, composition API hooks (useRoute/useRouter/useLink) and devtools improve debugging; the bundle drops to under 7KB.
AI-written summary · about
chapters (11)
- 0:00Start
- 3:52Routes
- 10:59Url Encoding
- 14:45Router Links
- 21:21Navigation Failure Time
- 24:43Navigation Guards
- 25:58Route Prop on Rotterview
- 28:29Composition Api
- 30:39Uselink
- 31:20Devtools
- 32:18Timeline








