Vue · Senior · Question 59 of 75
When is router.beforeResolve the right place for a check?
- ✓Correct answer: For logic that should run after in-component guards and async route components resolve, right before confirming navigation
- 2To change the URL format
- 3To run code after the page has rendered
Explanation
It's a good spot for permission checks or fetching that need all route components loaded. afterEach can't cancel navigation.