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

Function RowComponent

packages/solid-db/tests/useLiveQuery.test.tsx:1974–1983  ·  view source on GitHub ↗
(props: { person: { id: string; name: string } })

Source from the content-addressed store, hash-verified

1972 const nameEffectCounts: Record<string, number> = {}
1973
1974 function RowComponent(props: { person: { id: string; name: string } }) {
1975 const id = props.person.id
1976 // createComputed fires once initially and again each time person.name changes
1977 createComputed(() => {
1978 // Access name to subscribe to it
1979 void props.person.name
1980 nameEffectCounts[id] = (nameEffectCounts[id] || 0) + 1
1981 })
1982 return <li data-testid={`person-${id}`}>{props.person.name}</li>
1983 }
1984
1985 function TestComponent() {
1986 const query = useLiveQuery((q) =>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected