Vue · Middle · Question 36 of 75
What is the difference between router.push and router.replace?
- ✓Correct answer:
pushadds a history entry;replaceswaps the current one, so Back skips it - 2
replacereloads the page - 3They are synonyms
Explanation
Use replace for redirects after login or when updating filters in the query string so the history isn't flooded. Both return a Promise that resolves after navigation.