In the previous chapter, we saw how to work with some testing suites such as Jest and Cypress in Vue. In this chapter, we'll look at working with vue-router and use it with Vue CLI 3. We'll look at some practical tasks such as lazy-loading components. We'll look at using the Vue add command to add vue-router and why that's not the best strategy, and steps to take to mitigate it. Understanding routing in Vue is beneficial if you want to build larger and more complex apps. The following a list of subjects covered in this chapter:
- Adding a new Vue project with vue-router and vuex
- Configuring preset options through VS Code's command line
- Understanding vue-router routes
- Using named routes
- Adding a dynamic route
- Navigating to a route from the methods option in a Vue instance
- Working with nested (child) routes
- Lazy-loading routes
We&apos...