We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
redux-form
redux
react-redux
react
react-dom
https://codesandbox.io/s/redux-form-example-de1di?file=/src/App.tsx
work
can not work Maximum update depth exceeded.
how to get form values with hook component
The text was updated successfully, but these errors were encountered:
Nothing to do with useSelector
useSelector
<Field name="firstName" component="input" type="text" validate={[maxLength(1)]} <-------------- this is the cause placeholder="First Name" />
if you are using field validation, the functions passed to the validate prop must be static, e.g.
validate
const maxLength = max => value => value && value.trim().length > max ? 'error' : undefined; const maxLength1 = maxLength(1); <Field name="firstName" component="input" type="text" validate={[maxLength1]} placeholder="First Name" />
alternatively, use sync validation
Sorry, something went wrong.
No branches or pull requests
Subject of the issue
Your environment
redux-form
redux
react-redux
react
react-dom
Steps to reproduce
https://codesandbox.io/s/redux-form-example-de1di?file=/src/App.tsx
Expected behaviour
work
Actual behaviour
can not work
Maximum update depth exceeded.
Other information
how to get form values with hook component
The text was updated successfully, but these errors were encountered: