@locavel/base-component
Base React component that provides automatically bind all instance methods.
Installation
npm install --save @locavel/base-component
Usage
import * as React from 'react';
import BaseComponent from '@locavel/base-component';
export default class MyComponent extends BaseComponent {
getFoo () {
return this.state.foo;
}
render () {
return (
<div>
{this.getFoo()}
</div>
)
}
}
License
MIT © Locavel