I got to call 4 api calls using useQuery - 4 different query Key
const { data1, isLoading } = useQuery('posts1', fetchPosts);
const { data2, isLoading } = useQuery('posts2', fetchPosts);
const { data3, isLoading } = useQuery('posts3', fetchPosts);
const { data4, isLoading } = useQuery('posts4', fetchPosts);
- I need to refetch this 4 at once on click of the button. How can I do that using useQuery option only.
0 Replies