爲什麼點擊事件不能正常工作。我現在用的反應JS。這裏是我的代碼 http://codepen.io/naveennsit/pen/dMEvzP爲什麼點擊事件不響應js?
var App= React.createClass({
handleClick:function(){
console.log('000');
alert('--')
},
render(){
return <button onClick="{this.handleClick()}">hello</button>
}
});
React.render(<App name='test'/>,document.getElementById('app'))