Back to React Router

Links

docs/api/components/Links.md

7.6.21.5 KB
Original Source

Links

<!-- ⚠️ ⚠️ IMPORTANT ⚠️ ⚠️ Thank you for helping improve our documentation! This file is auto-generated from the JSDoc comments in the source code, so please edit the JSDoc comments in the file below and this file will be re-generated once those changes are merged. https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/dom/ssr/components.tsx -->

[MODES: framework]

Summary

Reference Documentation ↗

Renders all the <link> tags created by the route module's links export. You should render it inside the <head> of your document.

tsx
import { Links } from "react-router";

export default function Root() {
  return (
    <html>
      <head>
        <Links />
      </head>
      <body></body>
    </html>
  );
}

Signature

tsx
function Links({ nonce, crossOrigin }: LinksProps): React.JSX.Element

Props

nonce

A nonce attribute to render on the <link> element

crossOrigin

A crossOrigin attribute to render on the <link> element