Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
modelenceQuery<T>(methodName, args): object
T
methodName
args
object
import { useQuery } from '@tanstack/react-query'; import { modelenceQuery } from '@modelence/react-query'; function MyComponent() { // Basic usage const { data } = useQuery(modelenceQuery('todo.getAll')); // With additional options const { data: todo } = useQuery({ ...modelenceQuery('todo.getById', { id: '123' }), enabled: !!id, staleTime: 5 * 60 * 1000, }); return <div>{data?.name}</div>; }
unknown
string
Args
queryFn()
Promise
queryKey