@locavel/base-component
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

@locavel/base-component

npm version Dependency Status devDependency Status

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

Readme

Keywords

Package Sidebar

Install

npm i @locavel/base-component

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

4.87 kB

Total Files

7

Last publish

Collaborators

  • lohn