Cannot read property 'target' of undefined

前端 未结 6 1227
感动是毒
感动是毒 2020-12-31 11:03

In my render method I have component


handleChange is fol

6条回答
  •  南方客
    南方客 (楼主)
    2020-12-31 11:31

    You are executing function rather than passing it as a prop.

    You need to change this,

     onChange={this.handleChange()}
    

    with this,

     onChange={this.handleChange}
    

提交回复
热议问题