Open Vs-kishu opened 8 months ago
look at My function I am doing same thing
useEffect(() => { if (form.formState.isDirty) { setFileChanged(true); } else { setFileChanged(false); } }, [form.formState.isDirty]);
Using this use Effect we can disabled the update post button so that user cannot click the update button for the API request even he/she not updated any field
look at My function I am doing same thing
useEffect(() => { if (form.formState.isDirty) { setFileChanged(true); } else { setFileChanged(false); } }, [form.formState.isDirty]);
Using this use Effect we can disabled the update post button so that user cannot click the update button for the API request even he/she not updated any field
What does your form look like?