Dev Helpers
← Back

Replace-history continuation

Place this file at components/ReplaceHistoryContinuation.tsx in an App Router project.

Open this example in the interactive library

Source code

// components/ReplaceHistoryContinuation.tsx

import Link from "next/link";

export default function ReplaceHistoryContinuation({
  href = "/guide",
  label = "Read guide",
}: { href?: string; label?: string } = {}) {
  return (
    <Link href={href} replace>
      {label}
    </Link>
  );
}