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

Function Prefetch

examples/solid/solid-start-streaming/src/routes/prefetch.tsx:16–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected