Dev Helpers
← Back

Retry route segment

Place this file at app/studio/error.tsx in an App Router project.

Open this example in the interactive library

Source code

"use client";

// app/studio/error.tsx

export default function RetryRouteSegment({ reset }: { reset: () => void }) {
  return (
    <section role="alert">
      <h2>This section could not load.</h2>
      <button onClick={reset}>Try again</button>
    </section>
  );
}