Next.js · Senior · Question 27 of 75

What does the user get if a Server Action calls revalidatePath and returns a value?

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.

Further reading

Problem with a question

Next.js · Senior · question 27

Test yourself

Take the Next.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz