skills/smithery.ai/data-fetching

data-fetching

Installation
SKILL.md

Data Fetching Patterns

1. Basic Query with TanStack Query

import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";

interface User {
  id: string;
  name: string;
  email: string;
}

// API functions
async function fetchUser(userId: string): Promise<User> {
  const res = await fetch(`/api/users/${userId}`);
  if (!res.ok) throw new Error("Failed to fetch user");
  return res.json();
}
Installs
1
First Seen
Mar 22, 2026
data-fetching from smithery.ai