tanstack-query-intent-core-design-query-keys-and-options
Installation
SKILL.md
Setup
import { queryOptions } from '@tanstack/react-query'
export function todoOptions(todoId: string) {
return queryOptions({
queryKey: ['todo', todoId],
queryFn: async () => ({ id: todoId, title: 'Ship skills' }),
staleTime: 60_000,
})
}