Skip to content
New issue

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

useField does not rerender component, when its props change #1035

Open
CUzkov opened this issue Aug 4, 2023 · 0 comments
Open

useField does not rerender component, when its props change #1035

CUzkov opened this issue Aug 4, 2023 · 0 comments

Comments

@CUzkov
Copy link

CUzkov commented Aug 4, 2023

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

@CUzkov CUzkov changed the title useField does not rerender component, when his props change useField does not rerender component, when its props change Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant