Gathering detailed insights and metrics for @trpc/react-query
Gathering detailed insights and metrics for @trpc/react-query
Gathering detailed insights and metrics for @trpc/react-query
Gathering detailed insights and metrics for @trpc/react-query
@trpc/tanstack-react-query
TanStack React Query Integration for tRPC
trpc-svelte-query-adapter
A simple adapter to use `@tanstack/svelte-query` with trpc, similar to `@trpc/react-query`.
@ssrx/trpc-react-query
Similar https://github.com/trpc/trpc/tree/main/packages/react-query, with the following major changes:
trpc-react
Standalone TRPC React package reimplementing `@trpc/react-query` in a less opinionated way. May eventually be merged into the official `@trpc/react-query` package.
🧙♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy.
npm install @trpc/react-query
Typescript
Module System
Node Version
NPM Version
90.6
Supply Chain
92.2
Quality
96.3
Maintenance
100
Vulnerability
99.6
License
TypeScript (80.91%)
MDX (16.97%)
JavaScript (1.09%)
CSS (1.03%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
37,860 Stars
4,635 Commits
1,387 Forks
89 Watchers
47 Branches
474 Contributors
Updated on Jul 16, 2025
Latest Version
11.4.3
Package Id
@trpc/react-query@11.4.3
Unpacked Size
589.28 kB
Size
122.89 kB
File Count
75
NPM Version
lerna/8.1.2/node@v22.11.0+arm64 (darwin)
Node Version
22.11.0
Published on
Jun 27, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
6
22
End-to-end typesafe APIs made easy
@trpc/react-query
A tRPC wrapper around react-query.
Full documentation for @trpc/react-query
can be found here
1# npm 2npm install @trpc/react-query @tanstack/react-query 3 4# Yarn 5yarn add @trpc/react-query @tanstack/react-query 6 7# pnpm 8pnpm add @trpc/react-query @tanstack/react-query 9 10# Bun 11bun add @trpc/react-query @tanstack/react-query
Create a utils file that exports tRPC hooks and providers.
1import { createTRPCReact } from '@trpc/react-query'; 2import type { AppRouter } from './server'; 3 4export const trpc = createTRPCReact<AppRouter>();
Use the provider to connect to your API.
1import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; 2import { trpc } from '~/utils/trpc'; 3import React, { useState } from 'react'; 4 5export function App() { 6 const [queryClient] = useState(() => new QueryClient()); 7 const [trpcClient] = useState(() => 8 trpc.createClient({ 9 url: 'http://localhost:5000/trpc', 10 }), 11 ); 12 return ( 13 <trpc.Provider client={trpcClient} queryClient={queryClient}> 14 <QueryClientProvider client={queryClient}> 15 {/* Your app here */} 16 </QueryClientProvider> 17 </trpc.Provider> 18 ); 19}
Now in any component, you can query your API using the proxy exported from the utils file.
1import { trpc } from '~/utils/trpc'; 2 3export function Hello() { 4 const { data, error, status } = trpc.greeting.useQuery({ name: 'tRPC' }); 5 6 if (error) { 7 return <p>{error.message}</p>; 8 } 9 10 if (status !== 'success') { 11 return <p>Loading...</p>; 12 } 13 14 return <div>{data && <p>{data.greeting}</p>}</div>; 15}
No vulnerabilities found.
Reason
30 commit(s) and 17 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
SAST tool is run on all commits
Details
Reason
Found 19/29 approved changesets -- score normalized to 6
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
46 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More