after update from vue-query to v4 #5685
Unanswered
treeindark
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello i use vue-query but for now i update to tanStack v4, But now its not working....
I use mutate with props, on refetch on props change but nothing arrive, i've try with useQuery to, props.data change, but query is not refetch
async function loadData () {
return await ApiFetch('/bl/event/' + props.number + "/get?" + new URLSearchParams({
data1: props.data1,
data1: props.data2,
}));
}
const { isSuccess, isLoading, isError, isFetching, data, error, refetch } = useQuery(
{
queryKey: ["table", props.data1, props.data2 ],
queryFn: loadData
}
);
and with mutation
const { error, isSuccess, mutate, reset } = useMutation({
mutationFn: (uuid) => ApiFetch(/bl/event/' + props.number + "/get?" + new URLSearchParams({
data1: props.data1,
data1: props.data2,
})),
onMutate ()
});
mutate(['table', props.data1, props.data2]);
Beta Was this translation helpful? Give feedback.
All reactions