useContext utils getData always returning undefined
I have my app set up with TRPC and when trying to call
const utils = trpc.useContext();
const cart = utils.cart.getCart.getData();
The data always winds up as undefined
even though I can see the data populated in the query cache. Is there any special gotchas with using these utils?
1 Reply
Nvm, I was adding a query client provider in my _app.tsx but after removing this isn't an issue anymore