The callback function passed by the react parent component to the child component, but the child component receives an array. Why?

problem description

the environmental background of the problems and what methods you have tried

have you tried the arrow function, but it still doesn"t work

related codes

/ / Please paste the code text below (do not replace the code with pictures)
parent component

handleSubmitComment(a) {
  // console.log(a)
  this.state.lists.push(a)
  this.setState({
    lists: this.state.lists
  })
}


 <ComInput>
   onSubmit = {this.handleSubmitComment.bind(this)}
 </ComInput>

subcomponents

handleSubmit(){
    console.log(this)
    if(this.props.children[1]){
        const {username,content} = this.state
        this.props.children[1]({username,content})
    }
    this.setState({
        content:"",
        username:""
    })
}

<button onClick={this.handleSubmit.bind(this)}></button>

what result do you expect? What is the error message actually seen?

shouldn"t it be this.props.onSubmit () to get it? why is there an array?

Jun.30,2021

 jsxchildren,React
 
 <ComInput>
   onSubmit = {this.handleSubmitComment.bind(this)}
 </ComInput>
 


 <ComInput onSubmit={this.handleSubmitComment.bind(this)} />
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-1b3dd4d-2b109.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-1b3dd4d-2b109.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?