8000 Error after placing DevTools component in React TS · Issue #199 · react-hook-form/devtools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Error after placing DevTools component in React TS #199
Open
@mohammed-hasan007

Description

@mohammed-hasan007

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0