MCPcopy Create free account
hub / github.com/TanStack/query / Prefetch

Function Prefetch

examples/solid/streaming-solid-start2/src/routes/prefetch.tsx:15–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13}
14
15export default function Prefetch() {
16 return (
17 <main>
18 <Title>Solid Query - Prefetch</Title>
19
20 <h1>Solid Query - Prefetch Example</h1>
21
22 <div class="description">
23 <p>
24 SolidStart now supports link prefetching. This means that when a user
25 hovers over a link, the browser can prefetch the data for that page
26 before the user even clicks on the link. This can make navigating
27 around your app feel much faster.
28 </p>
29 <p>
30 To see this in action, go to the home page and reload the page. Then
31 hover over the "Prefetch" link in the navigation. You should see the
32 user data prefetch in the background and in the devtools. When you
33 click on the link, the page should load instantly.
34 </p>
35 </div>
36
37 <UserInfo sleep={500} />
38 </main>
39 )
40}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected