import { QueryConfig, QueryInfo } from "@pastweb/tools/api/hooks/useQuery";
//#region src/api/hooks/useQuery/useQuery.d.ts
/**
* React wrapper for `@pastweb/tools` `useQuery`.
*
* The underlying query state machine is created once and remains owned by the
* tools package. React re-renders when the returned reactive query fields
* change. If the query needs providers or a shared cache, configure those in
* the agent used by `config.fn` or install the cache via `installApiCache` /
* `ApiQueryProvider`.
*
* @example
* ```tsx
* const users = useQuery({
* fn: () => agent.get('/api/users', { queryKey: ['users'] }),
* });
*
* if (users.isLoading) return ;
* return ;
* ```
*/
declare function useQuery(config: QueryConfig): QueryInfo;
//#endregion
export { useQuery };
//# sourceMappingURL=useQuery.d.ts.map