Error after placing DevTools component in React TS
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- react, typescript
Direzione di ricerca
Start by reproducing the error with the shown useForm setup and usage, then inspect the reset and subscription calls named in index.tsx and the stack traces from index.esm.mjs and index.cjs.development.js. Done means DevTools can remain mounted without the updateFormState exception or the unmounted-component warning.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
const form = useForm({
resolver: yupResolver(Yup.object(filterSchema).required()),
defaultValues: filter,
});
const {
register,
handleSubmit,
reset,
getValues,
watch,
setValue,
setFocus,
control,
} = form;
return (
<>
<FormContainer>
<DevTool control={control} />
</FormContainer>
</>
);
This is my code. I am trying to use DevTools but it is throwing this error
index.cjs.development.js:194 Uncaught TypeError: updateFormState is not a function
at shouldRenderFormState (index.cjs.development.js:194:1)
at Object.next (index.cjs.development.js:278:1)
at Object.next (index.esm.mjs:873:1)
at reset (index.esm.mjs:2062:1)
at index.tsx:141:5
at invokePassiveEffectCreate (react-dom.development.js:23487:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)
at invokeGuardedCallback (react-dom.development.js:4056:1)
at flushPassiveEffectsImpl
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
If I remove the DevTools component, then it runs fine. Can someone please help me..
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di react-hook-form/devtools
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
react-hook-form/devtools#234 · 1 commento · 5 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
react-hook-form/devtools#226 · 3 reazioni ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
react-hook-form/devtools#223 · 2 reazioni ·
-
DevTools in production Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
react-hook-form/devtools#212 · 5 commenti · 8 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
react-hook-form/devtools#208 · 13 commenti · 21 reazioni ·
Tutte le issue di react-hook-form/devtools
Issue simili
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Mend: dependency security vulnerability untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100