reactjs - React modify state with extern component -
i'm beginner react , got problem, want update state component 1 component . there html :
<div id="leftmenu"></div> <div id="systeme"></div>
i hide component in leftmenu component :
var leftmenu = react.createclass({ getinitialstate: function() { return {modif: false}; }, render: function() { return( <div classname="col s2"> <ul id="slide-out" classname="side-nav fixed"> <li><a classname={this.state.modif ? 'validate' : ' validate hidden'}><i classname="material-icons right">done</i>confirmer et reboot</a></li> <li><a classname={this.state.modif ? 'cancel' : 'cancel hidden'}><i classname="material-icons right">stop</i>tout annuler</a></li> </ul> </div> ) } });
i want modify modif state when systeme component fire action, possible ?
thank's ;)
Comments
Post a Comment