I want to use ref to get instance of EnhancedForm. It could be use validateFields and so on methods easily. But I get a warning
Warning: you should not use `ref` on enhanced form, please use `wrappedComponentRef`. See: https://github.com/react-component/form#note-use-wrappedcomponentref-instead-of-withref-after-rc-form140
I have see the content of the link. The aim of the example is to get instance of original Form. But i want to get instance of EnhancedForm. It's easily to use ref on EnhancedForm.
example like this
class Form extends React.Component { ... }
const EnhancedForm = createForm()(Form);
<EnhancedForm ref="form" />
this.refs.form // => The instance of EnhancedForm
const EnhancedForm = createForm()(Form);
<EnhancedForm wrappedComponentRef={(inst) => this.formRef = inst} />
this.formRef // => The instance of Form, it seems it no way to get instance of EnhancedForm
Otherwise, the name of wrappedComponentRef look like refer to EnhancedForm, but it refer to original form
I want to use ref to get instance of EnhancedForm. It could be use validateFields and so on methods easily. But I get a warning
I have see the content of the link. The aim of the example is to get instance of original Form. But i want to get instance of EnhancedForm. It's easily to use ref on EnhancedForm. example like this
Otherwise, the name of wrappedComponentRef look like refer to EnhancedForm, but it refer to original form