Complete the code to import the Vue Router library.
import [1] from 'vue-router';
The createRouter function is used to create a router instance in Vue 3 for SPA navigation.
Complete the code to define a route path for the Home component.
const routes = [{ path: '/', component: [1] }];The route path '/' usually points to the Home component in SPAs.
Fix the error in the router creation code by completing the blank.
const router = createRouter({ history: [1](), routes });createWebHistory is used for clean URLs without hashes in Vue Router for SPAs.
Fill both blanks to register the router in the Vue app.
const app = createApp(App); app.[1](router); app.[2]('#app');
Use app.use(router) to add routing, then app.mount('#app') to start the app.
Fill all three blanks to create a navigation link to the About page.
<router-link to=[1]>[2]</router-link> const routes = [ { path: '/', component: Home }, { path: [3], component: About } ];
The to attribute and route path must match the About page path "/about", and the link text is 'About'.
