TanStackT
TanStack4y ago
7 replies
moderate-tomato

wrap use-query in hooks?

Hi There,

Let's say I have an entity Post, I would normally make a useGetPosts() hook and a usePostPosts() hook. But would it be a better idea to just make one usePosts() where I export the useQuery and useMutation? Or should thoose two modules be separated into it's own hooks?
Was this page helpful?