PrefetchPageLinks

<PrefetchPageLinks />

此组件支持预取页面的所有资源,以便立即导航到该页面。它通过为给定页面的所有资源(数据、模块、CSS)渲染 <link rel="prefetch"><link rel="modulepreload"/> 标签来实现这一点。

¥This component enables prefetching of all assets for a page to enable an instant navigation to that page. It does this by rendering <link rel="prefetch"> and <link rel="modulepreload"/> tags for all the assets (data, modules, CSS) of a given page.

<Link rel="prefetch"> 在内部使用此功能,但你可以出于其他原因渲染它以预取页面。

¥<Link rel="prefetch"> uses this internally, but you can render it to prefetch a page for any other reason.

<PrefetchPageLinks page="/absolute/path/to/your-path" />

注意:你需要使用绝对路径。

¥Note: You need to use an absolute path.

Remix v2.17 中文网 - 粤ICP备13048890号