The Antd form component is rewritten with React Hooks. How do I get the value of the form?

the Antd form component is rewritten with React Hooks. How do I get the value of the form? For example, TextareaItem component of antd-mobile, and
rewrite it with React Hooks. The semi-finished code is as follows:

import React, { useState, useEffect} from "react"
import { List, TextareaItem } from "antd-mobile";
import { createForm } from "rc-form";


function TextareaItemExample {

  useEffect(() => {
    //this.autoFocusInst.focus();
  });

  return (
    <div>
      <List renderHeader={() => "Customize to focus"}>
        <TextareaItem
          title="title"
          placeholder="auto focus in Alipay client"
          data-seed="logId"
          ref={el => this.autoFocusInst = el}
          autoHeight
        />
        <TextareaItem
          title="content"
          placeholder="click the button below to focus"
          data-seed="logId"
          autoHeight
        />
      </List>
    </div>
  );
}

const TextareaItemExampleWrapper = createForm()(TextareaItemExample);

export default TextareaItemExampleWrapper;


question:
1, how to get the value of the form? Get the value so that it can be used to send ajax requests. There is a custom Hook library react-use-form-state , but it is used for native html forms. How can you do the same thing on antd forms?

2. How should the statement this.autoFocusInst.focus (); be written after the class component is changed to a function component?

Mar.08,2022

https://github.com/mushan0x0/. uses this library, supports antd or antd-m checking, full ts prompts, and even native form tags support


1.antd forms to specify a field using getFieldDecorator two-way binding and use this.props.form.validateFields or this.props.form.getFieldsValue to get the value of the form.
2. Try useRef


. Have you solved the problem

?
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b425b0-2c613.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b425b0-2c613.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?