Uncaught TypeError: Cannot read property 'Checked' of undefined - ReactJS

前端 未结 3 848
醉话见心
醉话见心 2020-12-21 16:45

I am trying to create a simple a TODO list app in ReactJS. My basics of React are not very clear so I am stuck here.

3条回答
  •  天命终不由人
    2020-12-21 17:03

    you can go with Alex Solution but you can also achieve the same thing by changing only two place like

    var that=this;
    var createItem = function(item) {
          return 
  • {item.text}
  • ; }; return
      {this.props.items.map(createItem)}
    ;

提交回复
热议问题