router.refresh()

A method that clears the Router Cache for the current route and asks the server for a fresh render, keeping client state.

In more detail

Use it after a client-side mutation that did not go through a revalidating Server Action. It does not clear the Data Cache or Full Route Cache on the server.

Related terms

Taught in

References