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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -