If the function to be launched has parameters, it must be bound to the function as follows:
var Hello = React.createClass({ handleClick: function (text) { alert(text) }, render: function () { return <button onClick = { this.handleClick.bind(null, "Hello World") } > Click Me < /button>; } }); React.render(<Hello / > , document.getElementById('container'));
Now that makes sense. Thanks again @ Chris-Hawkes for pointing me in the right direction.
source share