Vue · Middle · Question 33 of 75

Why doesn't the page update when navigating from /users/1 to /users/2?

Explanation

React to param changes with watch(() => route.params.id, load, { immediate: true }) or onBeforeRouteUpdate. Alternatively force a remount with <RouterView :key="route.fullPath" />.

Further reading

Problem with a question

Vue · Middle · question 33

Test yourself

Take the Vue · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz