when I was writing a login page.
< LoginForm icon="mobile" onChange= {() = > this.handleChange ()} / >
use < input className="number-input" type= {filetype} onChange= {this.props.onChange} value= {this.state.value} / >
in the child component to get the value of the input box, and then write constuctor () {super (); this.state= {value:""}}
but the console mistakenly says that value is empty, and then I set the value of the subcomponent to empty, give state.value a value in the controller, and I can print the value of state.value. Then I print the function this.props.onChange on return under render () {} in the subcomponent, and print it twice in the browser. Once it returns the undefine, returned by the function function,. Excuse me, what is the problem and how to solve it.