Description
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..