Apollo hooks useQuery and useMutation under the same component

Viewed 1002

I just recently started to learn GraphQL and React-Apollo and I'm wondering what's the recommended approach of using useQuery and useMutation hooks if I need them inside the same component. Since both hooks return {data, loading, error} object the names are conflicting. Should I just assign unique names to the properties while destructuring or is it better to move the logic to separate container components?

0 Answers
Related