Vue · Senior · Question 56 of 75
What is onServerPrefetch for?
- ✓Correct answer: Awaiting data fetching during SSR so the server renders the component with data
- 2Prefetching routes in the browser
- 3Running code only after hydration
Explanation
The server waits for the returned promise before rendering. The data must then be serialized to avoid refetching on the client.