Skip to content
Permalink
Browse files

Fix validateOnMount (#1971)

  • Loading branch information...
jaredpalmer committed Oct 30, 2019
1 parent 56c0a80 commit d90149e6e75aada13a2a02f390495d268237ce04
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/Formik.tsx
@@ -348,11 +348,11 @@ export function useFormik<Values extends FormikValues = FormikValues>({
}
);

// React.useEffect(() => {
// if (validateOnMount && isMounted.current === true) {
// validateFormWithLowPriority(props.initialValues);
// }
// }, [props.initialValues, validateFormWithLowPriority]);
React.useEffect(() => {
if (validateOnMount && isMounted.current === true) {
validateFormWithLowPriority(props.initialValues);
}
}, [props.initialValues, validateOnMount, validateFormWithLowPriority]);

const resetForm = React.useCallback(
(nextState?: Partial<FormikState<Values>>) => {

0 comments on commit d90149e

Please sign in to comment.
You can’t perform that action at this time.