Incorrect console warning on useForm is not connected to Form element

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. Start the example at https://codesandbox.io/s/sparkling-flower-e2hyr
  2. In the console, see warning “Warning: Instance created by useForm is not connect to any Form element. Forget to pass form prop?”

What is expected?

No warning message because the form instance is connected to the Form component.

What is actually happening?

Console warning message on useForm instance is not connected to any Form element.

Environment Info
antd 4.0.3
React 16.13.1
System codesandbox.io
Browser 80.0.3987.149 (Official Build) (64-bit)

grammar: “is not connect” -> “is not connected”

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

0reactions
DanielXavierJobcommented, Oct 28, 2022

getContainer={false} 它沒有解決我的問題,我也有同樣的警告,還有其他解決方案嗎?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Instance created by `useForm` is not connect to any Form ...
Here i get the next warning: Warning: Instance created by `useForm` is not connect to any Form element. Forget to pass `form` prop?...
Read more >
useForm - setError - React Hook Form
An error that is not associated with an input field will be persisted until cleared ... This method will force set isValid formState...
Read more >
useForm | React Hook Form - Simple React forms validation
This is a global config that overwrites child-level config, if you want to have individual behavior, then you should set the config at...
Read more >
useFormState - ErrorMessage - React Hook Form
A simple component to render associated input's error message. ... handleSubmit } = useForm(); const onSubmit = data => console.log(data); return ( <form...
Read more >
Advanced Usage - React Hook Form
The benefit is you can connect your input with React Hook Form much easier. Copy. import { FormProvider, useForm, useFormContext } from ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found