Error after placing DevTools component in React TS
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react, typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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..
- Ngôn ngữ chính
- TypeScript
- Star
- 670
- Fork
- 55
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của react-hook-form/devtools
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
react-hook-form/devtools#234 · 1 bình luận · 5 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
react-hook-form/devtools#226 · 3 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
react-hook-form/devtools#223 · 2 reaction ·
-
DevTools in production Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
react-hook-form/devtools#212 · 5 bình luận · 8 reaction ·
-
issue: Warning: Cannot update a component (`DevTool`) while rendering a different component. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
react-hook-form/devtools#208 · 13 bình luận · 21 reaction ·
Tất cả issue của react-hook-form/devtools
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
copse-dev/agent-pane#2953 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Đang mởbug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Client support matrix inclusion Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
calcite-components needs triage refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Esri/calcite-design-system#15203 ·