# bindable-component

> Expose extendable react component for binding handlers

Latest version **1.1.0** (published 2015-10-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install bindable-component
pnpm add bindable-component
yarn add bindable-component
bun add bindable-component
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2015-10-31 |
| First published | 2015-09-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Steven White |
| Maintainers | swhite24 |
| Keywords | react, base, component, bind, purerender |

## Links

- npm: https://www.npmjs.com/package/bindable-component
- Repository: https://github.com/swhite24/bindable-component
- Homepage: https://github.com/swhite24/bindable-component#readme
- Issues: https://github.com/swhite24/bindable-component/issues
- npm.io page: https://npm.io/package/bindable-component

## Dependencies (3)

- [react](https://npm.io/package/react.md) ^0.14.1
- [react-mixin](https://npm.io/package/react-mixin.md) ^3.0.1
- [react-addons-pure-render-mixin](https://npm.io/package/react-addons-pure-render-mixin.md) ^0.14.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2015-10-31
- 1.0.0 — 2015-09-18

## README

# bindable-component

![https://travis-ci.org/swhite24/bindable-component.svg?branch=master](https://travis-ci.org/swhite24/bindable-component.svg?branch=master)

Exposes `BindableComponent` to easily bind component methods for use as handlers within react.

Also provides `BaseComponent`, with the only difference being the inclusion of the `PureRenderMixin`.

## Installation

```bash
npm install --save bindable-component
```

## Usage

```jsx
import { BindableComponent } from 'bindable-component';

// Aternatively
// import { BaseComponent } from 'bindable-component';

class MyComponent extends BindableComponent {
  constructor() {
    super();

    this._bind('onClick', 'onChange');
  }

  onClick() {
    // Will have proper this scope
  }

  onChange() {
    // Will have proper this scope
  }

  render() {
    return (
      <form>
        <input onChange={this.onChange} />
        <button onClick={this.onClick}>submit</button>
      </form>
    );
  }
}
```

## License

See [LICENSE](LICENSE).

---
_Source: https://npm.io/package/bindable-component · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
