📅  最后修改于: 2022-03-11 15:03:56.693000             🧑  作者: Mango
//you will need to retrieve the ref at your constructor using React.createRef:
//At constructor
function: this.myTextInput = React.createRef();
//At render function:
//And then you can call
this.myTextInput.current.clear();