Vue Router
Vue Router, as stated in the Vue.js documentation, is officially recommended as a router service for any Vue.js application. It provides a single entry point for communication between components with routes, hence controlling the flow of the application effectively, regardless of the user's behavior.
With a wide range of features, it eases the process of switching pages without the need to refresh the page.
Setting Up Vue Router
Vue Router is not installed by default; however, it can easily be enabled when creating an application with Vue CLI. Create an application by running the following command:
vue create <your-project-name>
Select the Manually select features
option as shown in Figure 6.1:
After choosing the option to manually select features, you will be shown a list of features as presented in Figure 6.2. At the time of writing, by default Babel
and...