Brainlaq
get state of streaming response
Is there a way to get the state of a streaming response when using https://trpc.io/docs/client/links/httpBatchStreamLink and returning an async iterator?
"isPending" is false once the headers arrive and I did not find anything else.
2 replies
Early return for certain input parameter for queryFn
I want to transform this useQuery to trpc
i came up with this but although eslint does not complain this surely is against the rules of react / a bad pattern because I am calling a hook conditionaly, right?
I wrote this hook to get the chat history for existing chats while pasing an empty history to the mutation when creating a new chat. I understand this could be done server side but i want to prevent the unnecessary fetch.
2 replies