(props: { person: { id: string; name: string } })
| 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) => |
nothing calls this directly
no outgoing calls
no test coverage detected