`useQuery` in client components
I have a very simple app with a single page configured to use SSR. The component that the page renders requests data using the tRPC client and
useQuery
function. I modified the component to be a client component by adding use client
on top of the file.
The result I expected to see was app fetching the component from the server and loading data asynchronously from the client.
Instead, the server's response is delayed until the data is loaded and the browser renders component with the data already loaded.
Is it possible to use the combination of tRPC + SSR + use client
? If so, wouldn't the code below result in the behavior I was expecting?
0 Replies