I have
var TestApp = React.createClass({
getComponent: function(){
console.log(this.props);
},
render: function(){
retur
Here is how you define a react onClick event handler, which was answering the question title... using es6 syntax
import React, { Component } from 'react';
export default class Test extends Component {
handleClick(e) {
e.preventDefault()
console.log(e.target)
}
render() {
return (
this.handleClick(e)}>click me
)
}
}