I have the following controlled component set up using react-hook-forms.
<Controller
control={control}
name={"test"}
render={({ field: { onChange, value, name } }) => (
<Dropdown
name={name}
value={value}
handleChange={onChange}
options={foodCategories()}
/>
)}
/>
I want to call a debounce and and I tried doing the following:
handleChange={debounce(onChange, 500)}
but I keep getting errors throw:
This synthetic event is reused for performance reasons, Objects are not valid as a React child (found: object with keys {dispatchConfig, _targetInst, nativeEvent, type, target, currentTarget, eventPhase, bubbles, cancelable,
How can I call debounce on a controlled react hook form component?