News for hackers. Stuff that matters.
Re:Flux Application Architecture by underwater on Friday May 09, 2014 @12:57PM (#7721881)
You shouldn't be accessing the DOM unless you absolutely need it (e.g. get clientHeight on a node). Use state instead:

   _handleClick: function() {
     this.setState({expanded: true});
   },
 
   render: function() {
     return (
       <div className={this.state.expanded ? 'expanded' : 'compact'}>
         <button onClick={this._handleClick} />
       </div>
     );
   }

There are no comments on this comment yet.