react-component / react-component/field-form

warningUnhooked is causing inordinate amount of lag in dev environment

Open
#132 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1k
Forks
286
Avg merge
4d 16h
Merged PRs (30d)
1

Description

https://github.com/react-component/field-form/blob/84508184a015a4c00309c394ec0d46b8bd3214c4/src/useForm.ts#L139
What is the purpose of this timeout? It is causing SEVERE lag in my antd form. Up to several seconds upon keypress in form text Input! I had to manually edit rc-field-form in node_modules and disable this check altogether to get rid of it.
You can see my devtools Profiler log to see for yourself. https://gofile.io/d/Ln3elJ
I have a pretty large form, I must add.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/useForm.ts#L139 and inspect the purpose and timing of the warningUnhooked timeout. Reproduce the lag with a large form while reviewing the linked DevTools Profiler log; done means identifying and addressing the timeout's performance impact without breaking the form behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.