Open javierguzman opened 5 years ago
I have managed to get the error "PropType is defined but prop is not never used". I think this is because the propTypes I am defining are my functional component props. However, the "real" ones are the ones passed to the Formik render prop function. edit: I have fixed it...with this I get ESLint errors:
const renderResetPasswordRequestForm = ({ errors, touched, handleSubmit } ) => {
return (
<form onSubmit={handleSubmit}>
</form>
);
};
With this there are no errors:
const renderResetPasswordRequestForm = formikProps => {
const { errors, touched, handleSubmit } = formikProps;
return (
<form onSubmit={handleSubmit}>
</form>
);
};
Does anyone know why is this?
I'm running into this issue to, how can i add a proptype to formik props?
Running into the same issue here.
Hello all!
I am using Formik in my project and now I have started using Eslint. I am getting a bunch of messages saying stuff like for example, "values is missing in props validation" or "errors is missing in props validation".
These are Formik props and I would have thought I do not need to validate them manually.
If I do PropTypes.array or PropTypes.object then I get another ESLint error (e.g. "Prop type array is forbidden").
Is normal to get these errors? What is the best way to avoid them without disabling the Eslint rule?
Thank you in advance and regards.