MCPcopy Index your code
hub / github.com/TanStack/db / TestComponent

Function TestComponent

packages/solid-db/tests/useLiveQuery.test.tsx:1878–1895  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1876 )
1877
1878 function TestComponent() {
1879 const query = useLiveQuery((q) =>
1880 q.from({ persons: collection }).select(({ persons }) => ({
1881 id: persons.id,
1882 name: persons.name,
1883 })),
1884 )
1885
1886 return (
1887 <ul data-testid="list">
1888 <For each={query()}>
1889 {(person) => (
1890 <li data-testid={`person-${person.id}`}>{person.name}</li>
1891 )}
1892 </For>
1893 </ul>
1894 )
1895 }
1896
1897 const { findByTestId } = render(() => (
1898 <Suspense fallback={<div data-testid="loading">Loading...</div>}>

Callers

nothing calls this directly

Calls 4

useLiveQueryFunction · 0.90
queryFunction · 0.85
selectMethod · 0.80
fromMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…