How can you fetch data on a dynamic router with trpc?

JBJoseph Branch4/26/2023
I’m creating a table component within my NextJs app. Instead of making an api call in the parent component and passing the data to the table through props I’d like the component to be able to manage its own state. How can I achieve this in trpc v10?

In v9 I believe you could do
const helloNoArgs = trpc.useQuery(['hello']

What’s the equivalent, if there is one, in v10?
Nnlucas4/26/2023
v10 still has the react-query integration. Have you read the migration guide?
JBJoseph Branch4/27/2023
I did not. I entered trpc on v10 so I apologize, but thank you!
JBJoseph Branch4/27/2023
Is there a particular module that I need or should the below implementation work out of the box

useQuery(['post.byId', '1'], {
  trpc: {
    context: {
      batching: false,
    },
  },
});
JBJoseph Branch4/27/2023
trpc.post.byId.useQuery('1', {
  trpc: {
    batching: false,
  },
});


This works just fine, but I'm creating a component that is responsible for it's own data and this is specific to 1 case
JBJoseph Branch4/27/2023
The console tells me missing queryFn