reset function
The function error.tsx receives that re-renders the failed segment to try again.
In more detail
Call it from a Try again button. It re-renders the boundary's contents on the client; if the cause was on the server, refresh the data first, for example with router.refresh().
Related terms
- error.tsx — A special file that wraps a route segment in an error boundary and renders its component when something below it throws.
- router.refresh() — A method that clears the Router Cache for the current route and asks the server for a fresh render, keeping client state.
Taught in
- Error Boundaries: Nested error.tsx & Reset Logic — Next.js 15 & Modern App Router Architecture