react-es6-component

0.0.4 • Public • Published

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'
    });
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i react-es6-component

Weekly Downloads

47

Version

0.0.4

License

none

Last publish

Collaborators

  • nathanial