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

前端 未结 3 868
醉话见心
醉话见心 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:12

    Make createItem a method of TodoList class. The "this" reference is not being resolved as right now its a local function of render method. On a side note, React follows camel casing for handlers. Please rename the Clicked method to onChange, onChecked or onCheckClicked.

提交回复
热议问题