tanstack-query-intent-core-coordinate-query-execution
Installation
SKILL.md
Setup
import { useQuery } from '@tanstack/react-query'
export function Projects(props: { userId?: string }) {
const projects = useQuery({
queryKey: ['projects', props.userId],
queryFn: async () => [{ id: 'p1', userId: props.userId }],
enabled: Boolean(props.userId),
})
return <pre>{JSON.stringify(projects.data ?? [])}</pre>
}