Skip to content

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

Open
@CUzkov

Description

@CUzkov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions