trpc.useQuery() doesn't have keys like with react-query?
I'm using trpc.useQuery() to get the user and was thinking of using a key like with react-query so I can query the cache for the user again later. However, from what I can see, it looks like there's no keys when using useQuery on trpc?
If that's the case, is it good practice to store the user in context when using trpc? I wanted to avoid doing that if I can let react-query be my state manager.
Ultimately, (1) does useQuery() have a key value cache function? If not, (2) is it bad to useContext to store the user?
1 Reply
tRPC automatically generates keys for your query