# react-pull-stream

> Create a duplex stream from a react component.

Latest version **2.0.3** (published 2017-10-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-pull-stream
pnpm add react-pull-stream
yarn add react-pull-stream
bun add react-pull-stream
```

## 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 | 2.0.3 |
| Published | 2017-10-09 |
| First published | 2016-10-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | nichoth |
| Maintainers | nichoth |
| Keywords | react, pull, stream, pull-stream, duplex |

## Links

- npm: https://www.npmjs.com/package/react-pull-stream
- Repository: https://github.com/nichoth/react-pull-stream
- Homepage: https://github.com/nichoth/react-pull-stream#readme
- Issues: https://github.com/nichoth/react-pull-stream/issues
- npm.io page: https://npm.io/package/react-pull-stream

## Dependencies (5)

- [xtend](https://npm.io/package/xtend.md) ^4.0.1
- [pull-notify](https://npm.io/package/pull-notify.md) ^0.1.1
- [pull-stream](https://npm.io/package/pull-stream.md) ^3.4.5
- [pull-pushable](https://npm.io/package/pull-pushable.md) ^2.0.1
- [pull-abortable](https://npm.io/package/pull-abortable.md) ^4.1.0

## 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

- 2.0.3 (latest) — 2017-10-09
- 2.0.2 — 2017-05-14
- 2.0.1 — 2017-05-14
- 2.0.0 — 2017-05-13
- 1.0.0 — 2017-03-22
- 0.1.1 — 2017-03-02
- 0.1.0 — 2017-02-12
- 0.0.6 — 2016-11-08
- 0.0.5 — 2016-11-03
- 0.0.4 — 2016-11-03
- 0.0.3 — 2016-11-02
- 0.0.2 — 2016-11-01
- 0.0.1 — 2016-10-23
- 0.0.0 — 2016-10-23

## README

# react pull stream


**This is deprecated.** See http://npm.im/@invintus/react-pull-stream


Create a duplex stream from a react component.


## install

    $ npm install react-pull-stream


## example

```js
var React = require('react')
var h = React.createElement
var reactDom = require('react-dom')
var S = require('pull-stream')
var toStream = require('../')

function MyView (props) {

    function click (n) {
        props.push(n)
    }

    return h('div', {
        className: 'app'
    }, [
        h('h1', { key: 'h' }, props.count),
        h('button', { key: 1, onClick: click.bind(null, 1) }, '1'),
        h('button', { key: 2, onClick: click.bind(null, 2) }, '2'),
        h('button', { key: 3, onClick: click.bind(null, 3) }, '3'),
    ])
}

MyView.defaultProps = { count: 0 }


// duplex stream
var stream = toStream(MyView, function onEnd (err) {
    console.log('its over')
})

var el = document.createElement('div')
document.body.appendChild(el)
reactDom.render(React.createElement(stream.view), el)

S(
    stream,
    S.map( n => ({ count: n }) ),
    stream
)

S(
    // you can have mulitple subscripbers
    stream.source.listen(),
    S.log()
)

stream.abort()  // end things

```

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