final-form / final-form/react-final-form
useField does not rerender component, when its props change
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
### Are you submitting a **bug report** or a **feature request**?
Feature request
### What is the current behavior?
Hi! Why useField and Field do not rerender components, when validate and validateFields props were change? I saw an explanation on the website, but this contradicts the philosophy of the react, that any props-changing must rerender components. If developer want to optimize this behavior, he should use useCallback or use Memory hooks. I guess it really wrong, if the library, that wrote for the other library, does not follow philosophy of the latter and use strange, not native optimizations (from the other library's point of view). Can you, please, fix this? The "key" solution is also not entirely correct (and it does not work with useField), because it is the other props and you need to write additional crutches to make it work
May be you can add third arg, like flags or array of deps, that allow useField rerender component, when these two props changed
### Other information
Contributor guide
Assessment
This issue has not been assessed yet.