In this Vue 3 tutorial, we learn how to navigate to different pages in our app with routing. We cover how to install the router package, create and load routes to components and views, dynamic route links and redirecting and 404 routes. Finally, we take a look at how to navigate programmatically and how to lazy load routes to improve application performance.
We cover the following topics:
00:00 - What is routing?
00:40 - How to setup the routing system
03:47 - How to create a route
05:23 - How to load router components
06:31 - How to link to routes
07:13 - How to style an active router link
08:15 - Named router links
09:22 - How to redirect a route to another
10:14 - Catch-all routes & 404 pages
11:35 - The History API (programmatic navigation)
13:28 - Lazy loading pages
14:20 - How to generate a new project with the Router package
15:01 - Next up
This lesson is also available in written format
https://www.koderhq.com/tutorial/vue/router-routing/
Check out the Vue 3 for Beginners playlist for more Vue tutorial videos
https://www.youtube.com/playlist?list=PLFAU47Id44XG48v5dPPTGMgJfjMnsU8Bw
Subscribe to the channel and never miss a lesson
https://www.youtube.com/channel/UCz6k9pRLevdJGAsMMAVSb_Q?sub_confirmation=1
Visit the website for a wide range of programming tutorials
https://www.koderhq.com