field-form
field-form copied to clipboard
how to avoid throwing error from the validation of form instance
I know this error is only thrown during development
I have some codes similar to the following
const [form] = useForm()
const {data, isLoading} = fetchSomeData()
useEffect(() => {
if (isLoading) form.setFieldsValue(...)
}, [isLoading, data])
return isLoading ? 'loading' : <Form form={form}>...</Form>
Everything works well but there is an error Warning: Instance created by useFormis not connected to any Form element. Forget to passform prop?
Is there any way to disable this verification 😀