0
嵌套功能不起作用ReactJs。但它在正常工作Javascript。ReactJs嵌套功能不起作用
它表明这个错误
Uncaught TypeError: Cannot set property 'getWlc' of undefined
我怎么能写里面ReactJs功能
function ldViewLayer() {
this.getWlc = function() {
alert('Try Alerts on Babel');
}
this.getWlc();
}
ldViewLayer();
'this'在非结合的非箭头的功能,除非你调用未定义的严格模式用'new'功能。 – SimpleJ