React
Fully typed client for React JS with TanStack Query
Installation
Setup
The client
is exactly the same as the vanilla client.
You can create it globally or in a component based on your needs.
Usage
useMutation
and other APIs are exactly the same; we just wrap TanStack Query.
However, oRPC will manage the query key
and function
for you, providing the best developer experience.
Use Infinite Query
To use useInfiniteQuery
, the procedure must have a cursor
input field (with any type).
Again, oRPC useInfiniteQuery
just wraps TanStack Query.
However, oRPC will manage the query key
and function
for you, providing the best developer experience.
Utils
Use Queries
Use Context
Others
oRPC React is well tested, it provides up to 30+ wrapper TanStack Query APIs. Please install and tinker with it.