skip to Main Content

Reactjs – How to submit form with react-query

I have following code const useCreateSupplier = (createSupplierCommand: CreateSupplierCommand) => { return useMutation({ mutationFn: () => axiosClient .post("/supplier", { createSupplierCommand }) .then((res: AxiosResponse) => res.data), onSuccess: async () => { await queryClient.invalidateQueries({ queryKey: [queries.get_suppliers], }); }, }); }; const CreateSupplierForm…

VIEW QUESTION
Back To Top
Search