Next.js · Senior · Question 27 of 75
What does the user get if a Server Action calls revalidatePath and returns a value?
- ✓Correct answer: The action's result and the updated RSC tree in one response
- 2Only the result; the page has to be reloaded manually
- 3Two separate responses: first the result, then the HTML
Explanation
Next.js optimizes mutations: the Server Action response contains both the returned value and the new payload of the affected routes (a single roundtrip). The user immediately sees the updated UI without an extra request.