-
Notifications
You must be signed in to change notification settings - Fork 125
Closed
Description
I have a large form (100+ checkboxes) on one of my pages, it takes more then 3 sec to initial render it. After the initial render it works properly.
I've checked what make it stuck, and looks like that the attachToForm
method which each input is calling on mount and it triggers validation for each insert, maybe it is better to debounce the call for form
.
attachToForm -> validate(Input) (which calls to setState) -> validateForm (which calls to setState)
This chain of calls means that there are many formValidation (Arithmetic progression) which is redundant, cause onMount of the form it self there another call for validateForm
My test page: https://codesandbox.io/s/awesome-taussig-2c1c4