React Router API Reference
    Preparing search index...

    Function PrefetchPageLinks

    • Renders <link rel=prefetch|modulepreload> tags for modules and data of another page to enable an instant navigation to that page. <Link prefetch> uses this internally, but you can render it to prefetch a page for any other reason.

      For example, you may render one of this as the user types into a search field to prefetch search results before they click through to their selection.

      Parameters

      • props: PageLinkDescriptor

        Props

        • OptionalcrossOrigin?: "anonymous" | "use-credentials"

          How the element handles crossorigin requests

        • Optionaldisabled?: boolean

          Whether the link is disabled

        • OptionalhrefLang?: string

          Language of the linked resource

        • Optionalintegrity?: string

          Integrity metadata used in Subresource Integrity checks

        • Optionalmedia?: string

          Applicable media: "screen", "print", "(max-width: 764px)"

        • Optionalnonce?: string

          A nonce attribute to render on the <link> element

        • page: string

          The absolute path of the page to prefetch, e.g. /absolute/path.

        • OptionalreferrerPolicy?:
              | ""
              | "origin"
              | "no-referrer"
              | "no-referrer-when-downgrade"
              | "same-origin"
              | "strict-origin"
              | "origin-when-cross-origin"
              | "strict-origin-when-cross-origin"
              | "unsafe-url"

          Referrer policy for fetches initiated by the element

      Returns null | Element

      A collection of React elements for <link> tags

      import { PrefetchPageLinks } from "react-router";

      <PrefetchPageLinks page="/absolute/path" />

      @public

      framework