Having great difficulty using Streaming
I wanted to use the stream api with tRPC to handle a response with alot of return values and I looked at the docs for this https://trpc.io/docs/client/react/useQuery#streaming, and when trying to use the example TypeScript gives me the error:
Property 'map' does not exist on type 'AsyncGenerator<number, void, unknown>'.
and my JavaScript console gives me this error as well, TypeError: _myQuery_data.map is not a function
.
I am using the T3 Stack with tRPC running Bun 1.1.3
with Next.js v14.2.4
useQuery() | tRPC
The hooks provided by @trpc/react-query are a thin wrapper around @tanstack/react-query. For in-depth information about options and usage patterns, refer to their docs on queries.
Solution:Jump to solution
Uhh, I think
bun update
did the trick, since I didn't change anything and everything worked. When people say if it ain't broke, don't fix it, this is what they mean.1 Reply
Solution
Uhh, I think
bun update
did the trick, since I didn't change anything and everything worked. When people say if it ain't broke, don't fix it, this is what they mean.