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'
});
}
}
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 0.0.4
42
Version History
Package Sidebar
Install
npm i react-es6-component
Weekly Downloads