## INTERFACE CODE
interface Patient {
id: string;
patientName: string;
patientGender: string;
patientDob: string;
patientAddress: string;
phoneNo: string;
}
## USEMUTATION CODE
const mutation = useMutation(updatePatient, {
onSuccess: () => {
queryClient.invalidateQueries(['patient', patient.id]);
message.success('Patient updated successfully');
},
onError: () => {
message.error('Error updating patient');
},
});
## ONFINISH METHOD
const onFinish = (values: any) => {
const updatedPatient = {
...values,
patientDob: values.patientDob.format('YYYY-MM-DD'),
};
mutation.mutate({ id: patient.id, ...updatedPatient });
};
https://x.com/tan_stack/status/2031128535470104577?s=20
dry-scarlet · 10h ago
https://x.com/powersync_/status/2010721010006552775?s=20
dry-scarlet · 2mo ago
You can now submit your website/app/project to http://TanStack.com 's new showcase and have it seen by the TanStack community! - Global showcase browser - Per-library filters - Category filters Submit here: https://tanstack.com/showcase/submit View all here: https://tanstack.com/showcase
dry-scarlet · 3mo ago