Open History to see the last commit
1import { Title } from '@solidjs/meta'
2import { PostViewer } from '~/components/post-viewer'
3import { UserInfo } from '~/components/user-info'
4β
5export default function Mixed() {
6 return (
7 <main>
8 <Title>Solid Query - Mixed</Title>
9β
10 <h1>Solid Query - Mixed Example</h1>
11β
12 <div class="description">
13 <p>
14 You may want to require that key queries resolve before the initial
15 HTML is streamed to the client, while allowing the rest of your
16 queries to stream to the client as they resolve. A common use case for
17 this is to populate SEO meta tags and/or social graph information for
18 unfurl scenarios such as sharing the page as a link in Slack.
19 </p>
20β
21 <p>
22 In this example, the quick (100ms) user query has deferStream set to
23 true, while the more expensive post query (1000ms) is streamed to the
24 client when ready. Clients with javascript disabled will see the
25 resolved state for the user query, and the loading state for the post
26 query. (try turning off javascript and reloading this page)
27 </p>
28 </div>
29β
30 <UserInfo deferStream sleep={100} />
31β
32 <PostViewer sleep={1000} />
33 </main>
34 )
35}