MCPcopy Create free account
hub / github.com/react-hook-form/react-hook-form / debounce

Function debounce

src/logic/createFormControl.ts:190–194  ·  view source on GitHub ↗
(callback: T)

Source from the content-addressed store, hash-verified

188
189 const debounce =
190 <T extends Function>(callback: T) =>
191 (wait: number) => {
192 clearTimeout(timer);
193 timer = setTimeout(callback, wait);
194 };
195
196 const _setValid = async (shouldUpdateValid?: boolean) => {
197 if (_state.keepIsValid) {

Callers 1

shouldRenderByErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected