What you could do is pass a pointer to the Game function, as a property, to the Child component. For example:
var Game = React.createClass({
gameFunction: function() {
alert('gameFunction()');
},
render: function() {
return (
<div className="game">
<h1>Game</h1>
<Table gameFunction={this.gameFunction} />
</div>
);
}
});
var Table = React.createClass({
render: function() {
return (
<div className="table">
<table>
<tr>
<td onClick={this.props.gameFunction}>Cell</td>
</tr>
</table>
</div>
);
}
});
That being said, I'm brand new to React, and am not sure if this is the correct way to accomplish this!