MCPcopy Create free account
hub / github.com/TanStack/db / QueryPage

Function QueryPage

examples/solid/todo/src/routes/query.tsx:20–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18})
19
20function QueryPage() {
21 // Get data using live queries with Query collections
22 const todos = useLiveQuery((q) =>
23 q
24 .from({ todo: queryTodoCollection })
25 .orderBy(({ todo }) => todo.created_at, `asc`),
26 )
27
28 const configData = useLiveQuery((q) =>
29 q.from({ config: queryConfigCollection }),
30 )
31
32 return (
33 <Suspense fallback="Loading...">
34 <TodoApp
35 todos={todos()}
36 configData={configData()}
37 todoCollection={queryTodoCollection}
38 configCollection={queryConfigCollection}
39 title="todos (query)"
40 />
41 </Suspense>
42 )
43}

Callers

nothing calls this directly

Calls 3

useLiveQueryFunction · 0.90
orderByMethod · 0.80
fromMethod · 0.80

Tested by

no test coverage detected