I am new to React, I want to know how can I change the style of div with id "parent" while clicking of div with id "child".
<div id="parent"></div>
#parent{display:block;}
var Products=React:createClass({
showHide: function(){
// change style of parent id's "display:block" to "display:none"
},
render: function(){
return (
<div id="child" onclick={this.showHide}>ABCD</div>
);
});
ReactDOM.render(<Products />,document.getElementById('parent'));