score:2

if you have nested components you can call the other one's function like so:

child:

var component1 = react.createclass({
    render: function() {
        return (
            <div><button onclick={this.props.callback}>click me</button></div>
        )
    }
})

parent:

var component2 = react.createclass({
    dosomethinginparent: function() {
        console.log('i called from component 2');
    },
    render: function() {
        return (
            <div><component1 callback={this.dosomethinginparent} /></div>
        )
    }
})

same goes in your case. it wasn't very clear in your code so i couldn't help you with the code itself. if you get messy with this please post your entire code in a hierarchically way so it'll be more readable.


Related Query

More Query from same tag