0.0.4 • Published 9 years ago

react-es6-component v0.0.4

Weekly downloads
191
License
-
Repository
github
Last release
9 years ago

React ES6 Component

This component binds its methods, like the old-style React.createClass, so that "this" points to the right thing.

Usage

import Component from 'react-es6-component';
class MyComponent extends Component {
  render(){
    return (
      <div>
        <button onClick={this._magicAutoboundMethod} />
      </div>
    );
  }

  _magicAutoboundMethod(){
    this.setState({
      foo: 'bar'
    });
  }
}