We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently, as far as I can tell when data gets mutated, you have to manually update the tanstack query data in order to update the client state.
tanstack
const { data, error, refetch } = useQuery("get", "/api/test"); const { mutateAsync } = useMutate("patch", "/api/test"); const handleUpdateClick = async () => { await mutateAsync({ params: { query: { message: "Message updated by mutate!" } } }); // optionally refresh, etc. refetch(); };
There should be a clean way to update the query data without additional changes.
Either add a parameter, etc. to automatically update the query data.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
Currently, as far as I can tell when data gets mutated, you have to manually update the
tanstack
query data in order to update the client state.There should be a clean way to update the query data without additional changes.
Proposal
Either add a parameter, etc. to automatically update the query data.
Extra
The text was updated successfully, but these errors were encountered: