You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expected: formik.errors will contain field errors
result: When I use useFormik formik.errors = {}
This code work and formik.errors contain field errors
`import React, {useEffect, useState} from 'react';
import {Spin, Typography} from "antd";
import styles from "./SettingPage.module.scss"
import {Form, FormItem, Input, SubmitButton, ResetButton} from "formik-antd";
import {validateName} from "../authPage/utils";
import {Formik, FormikState} from "formik";
import {FormNameType} from "./SettingPage.types";
import {changeNameThunk} from "../../redux/slices/userSlice";
import {useDispatch, useSelector} from "react-redux";
import {RootState} from "../../redux/store";
import classNames from "classnames/bind";
let cx = classNames.bind(styles);
const { Text } = Typography;
`import React, {useEffect, useState} from 'react';
import {Spin, Typography} from "antd";
import styles from "./SettingPage.module.scss"
import {Form, FormItem, Input, SubmitButton, ResetButton} from "formik-antd";
import {validateName} from "../authPage/utils";
import {Formik, useFormik} from "formik";
import {FormNameType} from "./SettingPage.types";
import {changeNameThunk} from "../../redux/slices/userSlice";
import {useDispatch, useSelector} from "react-redux";
import {RootState} from "../../redux/store";
import classNames from "classnames/bind";
let cx = classNames.bind(styles);
const { Text } = Typography;
I use formik and formik-antd
expected: formik.errors will contain field errors
result: When I use useFormik formik.errors = {}
This code work and formik.errors contain field errors
`import React, {useEffect, useState} from 'react';
import {Spin, Typography} from "antd";
import styles from "./SettingPage.module.scss"
import {Form, FormItem, Input, SubmitButton, ResetButton} from "formik-antd";
import {validateName} from "../authPage/utils";
import {Formik, FormikState} from "formik";
import {FormNameType} from "./SettingPage.types";
import {changeNameThunk} from "../../redux/slices/userSlice";
import {useDispatch, useSelector} from "react-redux";
import {RootState} from "../../redux/store";
import classNames from "classnames/bind";
let cx = classNames.bind(styles);
const { Text } = Typography;
export const SettingPage = () => {
const [formName, setFormName] = useState<FormNameType | null>(null);
const [flagLoading, setFlagLoading] = useState(false);
};
`
But in this code formik.errors is always {}
`import React, {useEffect, useState} from 'react';
import {Spin, Typography} from "antd";
import styles from "./SettingPage.module.scss"
import {Form, FormItem, Input, SubmitButton, ResetButton} from "formik-antd";
import {validateName} from "../authPage/utils";
import {Formik, useFormik} from "formik";
import {FormNameType} from "./SettingPage.types";
import {changeNameThunk} from "../../redux/slices/userSlice";
import {useDispatch, useSelector} from "react-redux";
import {RootState} from "../../redux/store";
import classNames from "classnames/bind";
let cx = classNames.bind(styles);
const { Text } = Typography;
export const SettingPage = () => {
const { flagChangeName, firstName, lastName} = useSelector((state: RootState) => state.UserReducer);
const [formName, setFormName] = useState<FormNameType | null>(null);
};
`
Thanks in advance for your help, formik is good library
The text was updated successfully, but these errors were encountered: