formik
formik copied to clipboard
i am getting error even while using useField inside of Formik - Cannot read properties of undefined (reading 'getFieldProps')
i have my own ui library and my form elements uses useField
import React from 'react';
import { TextField } from '../input/Input';
interface Props {
readonly name: string
}
export function FormInput({name, ...props}:Props) {
// const [field] = useField(name)
console.log("field:", props);
return (
<TextField {...props} />
);
}
but when i install my lib and use my fileds inside of formik i am getting this error Cannot read properties of undefined (reading 'getFieldProps')
what i am doing wrong?
Same error here with Formik 2.4.5 and Storybook 8.0.8. Did you got the problem solved, @muhammaddiyor0104 ?
@muhammaddiyor0104 @rapitkan Please share codesandbox link with the issue
Same issue for me