Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

devtool prevent field in values prop from registering

Aperta
#197 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
react, typescript
Ambito
devtools, frontend

Direzione di ricerca

Start with the reproduction in /src/App.tsx and compare useForm({ defaultValues: { str } }) with the useForm({ values: { str } }) update while DevTools is enabled. Verify the reported behavior in the CodeSandbox; done means the field registers and its displayed value updates in the values case as it does with defaultValues.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

https://user-images.githubusercontent.com/38932402/229013340-0d389873-ae62-4922-91fd-e97e5d417d12.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.

https://user-images.githubusercontent.com/38932402/229014523-8c7695e4-65b5-4b66-8774-c5dbb812f1ef.mp4

Lingua principale
TypeScript
Stelle
670
Fork
55
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di react-hook-form/devtools

Tutte le issue di react-hook-form/devtools

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.