useQuery
useQuery is a hook that allows you to fetch data from an API and cache the results.
Installation
npx shadcn@latest add "https://shadcn-hooks.vercel.app/r/use-query.json"pnpm dlx shadcn@latest add "https://shadcn-hooks.vercel.app/r/use-query.json"yarn dlx shadcn@latest add "https://shadcn-hooks.vercel.app/r/use-query.json"bun x shadcn@latest add "https://shadcn-hooks.vercel.app/r/use-query.json"Copy and paste the following code into your project.
npm install @tanstack/react-querypnpm add @tanstack/react-queryyarn add @tanstack/react-querybun add @tanstack/react-queryLast updated on