why this.state.text is throwing an error in function?

后端 未结 0 1170
情深已故
情深已故 2021-02-07 12:27
class SearchBar extends React.Component{

onformsubmit(event){
event.preventDefault();
console.log(this.state.text);

}

state={text:\'\'}
render(){

return (
相关标签:
回答
  • 消灭零回复
提交回复
热议问题