flowCreate.solutions

Generic Example: React Query

import { useQuery } from "@tanstack/react-query";
import { apiFetch } from "@/lib/apiClient";

export function useThings() {
  return useQuery({
    queryKey: ["things"],
    queryFn: () => apiFetch("/api/v1/things"),
  });
}