update orpc tanstack query integration (#299)

This commit is contained in:
Aman Varshney
2025-06-05 07:36:27 +05:30
committed by GitHub
parent 19f6a2ba6f
commit 1485809ad7
32 changed files with 85 additions and 110 deletions

View File

@@ -70,12 +70,12 @@ export default function TodosScreen() {
);
const toggleMutation = useMutation(
orpc.todo.toggle.mutationOptions({
onSuccess: () => todos.refetch(),
onSuccess: () => { todos.refetch() },
}),
);
const deleteMutation = useMutation(
orpc.todo.delete.mutationOptions({
onSuccess: () => todos.refetch(),
onSuccess: () => { todos.refetch() },
}),
);
{{/if}}
@@ -91,12 +91,12 @@ export default function TodosScreen() {
);
const toggleMutation = useMutation(
trpc.todo.toggle.mutationOptions({
onSuccess: () => todos.refetch(),
onSuccess: () => { todos.refetch() },
}),
);
const deleteMutation = useMutation(
trpc.todo.delete.mutationOptions({
onSuccess: () => todos.refetch(),
onSuccess: () => { todos.refetch() },
}),
);
{{/if}}