Skip to content

devtool prevent field in values prop from registering #197

@QzCurious

Description

@QzCurious

Version Number

react-hook-form: 7.43.9
react: 18.2.0

Codesandbox/Expo snack

https://codesandbox.io/s/hookform-devtools-bug-devtool-prevent-field-in-values-prop-from-registering-minvzb?file=/src/App.tsx

Steps to reproduce

I have two video clip to demonstrate. Both two demo had devtool on.

By useForm({ defaultValues: { str } }). It works as expect.

83b4e9ac-8fb5-4e0e-90cd-ac78acf29c06.mp4

By useForm({ values: { str } }). I use a useEffect to trigger the update behavior of values. The field seems not to be registered as the "value" show above the input is never updated.

77f4a3a3-3aef-4fcd-bb52-29f61f576755.mp4

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