codejump

Router Basics

Preview — 3 of 10 questions

What is the correct way to create a Vue Router instance in Vue 3?

Anew VueRouter({ routes })
BcreateRouter({ history: createWebHistory(), routes })
CVue.use(Router, { routes })
Drouter({ mode: 'history', routes })

What is the correct way to create an internal navigation link with Vue Router?

A<a href="/about">About</a>
B<router-link to="/about">About</router-link>
C<vue-link path="/about">About</vue-link>
D<navigate to="/about">About</navigate>

What does <router-view> do in a Vue application?

AIt lists all available routes as a navigation menu
BIt wraps all router-link components for layout styling
CIt renders the component matched by the current route URL
DIt provides a dropdown for route selection during development

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.