Skip to content

Commit 5c01ee7

Browse files
authored
FIX: Fixed resetForm function dependency issue (#3872)
Closes: #3861 As i mentioned in the issue section that the unexpected behaviour is comming while using resetForm function due to missing dependency. Here is the fix.
1 parent 41720c2 commit 5c01ee7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/formik/src/Formik.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ export function useFormik<Values extends FormikValues = FormikValues>({
417417
dispatchFn();
418418
}
419419
},
420-
[props.initialErrors, props.initialStatus, props.initialTouched]
420+
[props.initialErrors, props.initialStatus, props.initialTouched, props.onReset]
421421
);
422422

423423
React.useEffect(() => {

0 commit comments

Comments
 (0)