# smallorange-reactive-store-react

> React components for Small Orange Reactive Store

Latest version **1.0.3** (published 2017-02-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install smallorange-reactive-store-react
pnpm add smallorange-reactive-store-react
yarn add smallorange-reactive-store-react
bun add smallorange-reactive-store-react
```

## 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.0.3 |
| Published | 2017-02-21 |
| First published | 2017-01-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | feliperohde |

## Links

- npm: https://www.npmjs.com/package/smallorange-reactive-store-react
- Repository: https://github.com/feliperohdee/smallorange-reactive-store-react
- Homepage: https://smallorange.co
- Issues: https://github.com/feliperohdee/smallorange-reactive-store-react/issues
- npm.io page: https://npm.io/package/smallorange-reactive-store-react

## Dependencies (5)

- [rxjs](https://npm.io/package/rxjs.md) ^5.2.0
- [react](https://npm.io/package/react.md) ^15.4.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [react-dom](https://npm.io/package/react-dom.md) ^15.4.2
- [smallorange-reactive-store](https://npm.io/package/smallorange-reactive-store.md) ^1.0.6

## Recent versions

- 1.0.3 (latest) — 2017-02-21
- 1.0.2 — 2017-02-21
- 1.0.1 — 2017-01-24
- 1.0.0 — 2017-01-24

## README

[![CircleCI](https://circleci.com/gh/feliperohdee/smallorange-reactive-store-react.svg?style=svg)](https://circleci.com/gh/feliperohdee/smallorange-reactive-store-react)

# React Component for Small Orange Reactive Store

It attaches observables helpers to react components, and automatically tearsdown when destroyed;

### Methods

		on(...filter: string, replay: boolean = false): Observable<any>;
		once(...filter: string, replay: boolean = false): Observable<any>;
		trigger(key: string, data: any = null): void;

### Usage

		import React from 'react';
		import {
			Component
		} from 'smallorange-reactive-store-react';

		export class Messages extends Component {
			constructor(props) {
				super(props);

				this.state = {
					data: []
				};
			}

			componentDidMount() {
				this.on('inputChange')
					.subscribe(doSomething);

				this.once('destroy')
					.subscribe(() => console.log('Bye!'));
			}

			render() {
				return (
					<input type="text" onChange={e => this.trigger('inputChange', e)}>
				);
			}
		}

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