Arrow functions and class functions use the Form.create() method in the Antd Form component

The class function uses Form.create():

class CustomizedForm extends React.Component {
...code
}

CustomizedForm = Form.create({})(CustomizedForm);

Arrow functions use Form.create():

const aaa =(form)=>{
...code
}

const Aaaa = Form.create()(aaa);


In the arrow function, in order to use the form's api, such as: the form parameter needs to be passed in, in order to correctly pass in from getFieldsValue   getFieldValue   setFieldsValue等,


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325771736&siteId=291194637