Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
giogonzo committed Feb 11, 2022
1 parent 2eda48d commit 4080f94
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/useFormo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Reducer, useState } from "react";
import { Reducer, useMemo, useState } from "react";
import { useRefReducer } from "./useRefReducer";
import { FieldProps } from "./FieldProps";
import { NonEmptyArray } from "./NonEmptyArray";
Expand Down Expand Up @@ -357,7 +357,7 @@ export function useFormo<

const [
{
initialValues,
initialValues: initialValues_,
fieldValidators,
subFormValidators,
validateOnBlur: validateOnBlur_,
Expand All @@ -368,6 +368,8 @@ export function useFormo<
const validateOnChange = validateOnChange_ != null ? validateOnChange_ : true;
const validateOnBlur = validateOnBlur_ != null ? validateOnBlur_ : true;

const initialValues = useMemo(() => initialValues_, []);

const [submissionCount, setSubmissionCount] = useState(0);

const fieldArrayKeys = Object.keys(initialValues).filter(
Expand Down

0 comments on commit 4080f94

Please sign in to comment.