# ee-observer-mixin

> Mixin for listening to Event Emitters from React components

Latest version **0.0.1** (published 2015-01-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install ee-observer-mixin
pnpm add ee-observer-mixin
yarn add ee-observer-mixin
bun add ee-observer-mixin
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2015-01-26 |
| First published | 2014-12-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | jj |
| Maintainers | zjjweber |
| Keywords | React, mixin, EventEmitter |

## Links

- npm: https://www.npmjs.com/package/ee-observer-mixin
- Repository: https://github.com/zjjw/EEObserverMixin
- Issues: https://github.com/zjjw/EEObserverMixin/issues
- npm.io page: https://npm.io/package/ee-observer-mixin

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2015-01-26
- 0.0.0 — 2014-12-20

## README

![Observer](http://wiki.teamliquid.net/starcraft/images2/d/d3/Observer.png)

[Official sound effects](https://www.youtube.com/watch?v=2e0CRuS14ho) (see [Livefyre/Observer](https://github.com/Livefyre/Observer)).

The EEObserverMixin adds a `.listenTo` method to a React component. Events that are subscribed to using this method will have their handlers automatically unsubscribed when the component unmounts.

### Usage

`npm install ee-observer-mixin`

```js
var EEObserverMixin = require('ee-observer-mixin');
var React = require('react');

React.createClass({
  componentDidMount: function () {
    this.listenTo(eventEmitter, 'eventName', callback);
  },

  mixins: [EEObserverMixin]
});
```

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