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
Steps to reproduce
- Start the example at https://codesandbox.io/s/sparkling-flower-e2hyr
- In the console, see warning “Warning: Instance created by
useFormis not connect to any Form element. Forget to passformprop?”
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:
- Created 4 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://ant.design/components/form/#Why-is-there-a-form-warning-when-used-in-Modal
getContainer={false}它沒有解決我的問題,我也有同樣的警告,還有其他解決方案嗎?