Redirection only works in optimistic mode
I am using next js, ant ui, and supabase. The redirection after submission using the useForm hook only works in optimistic mutation mode, no error is given
useForm hook only works in mutation mode. Based on the provided knowledge sources, here are some insights and potential solutions:useForm hook in different mutation modes:useForm doesn't return data when using the Supabase data provider.onFinish promise resolves or rejects correctly.optimisticoptimisticoptimisticpessimisticpessimisticpessimisticpessimisticundoableonFinishUpdateisSubmittingonMutationSuccess const { onFinish, redirect } = useForm();
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
const data = await onFinish(formValues);
redirect("show", data?.data?.id);
};