Vue · Middle · Question 61 of 75
What are the two common ways to load data for a route?
- ✓Correct answer: After navigation (render first, show loading state) or before navigation (fetch in a guard, then render)
- 2Only in
main.tsbefore the app mounts - 3Only with Pinia
Explanation
Fetching after gives instant feedback; fetching before avoids showing an incomplete page. The choice is a UX trade-off.