Next.js · Middle · Question 3 of 75

What does revalidatePath('/blog') do after a mutation?

Explanation

The next request to /blog gets fresh data. When called in a Server Action, the updated UI comes back right in the action's response. For targeted invalidation of data used on many pages, tags are more convenient (cacheTag + revalidateTag/updateTag).

Further reading

Problem with a question

Next.js · Middle · question 3

Test yourself

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

Take this quiz