# pandapush-react

> React component for Pandapush

Latest version **1.0.2** (published 2015-12-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install pandapush-react
pnpm add pandapush-react
yarn add pandapush-react
bun add pandapush-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.2 |
| Published | 2015-12-03 |
| First published | 2015-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Neil Gupta |
| Maintainers | neilgupta |
| Keywords | react, pandapush, instructure |

## Links

- npm: https://www.npmjs.com/package/pandapush-react
- Repository: https://github.com/neilgupta/pandapush-react
- Issues: https://github.com/neilgupta/pandapush-react/issues
- npm.io page: https://npm.io/package/pandapush-react

## Dependencies (2)

- [faye](https://npm.io/package/faye.md) 1.1.1
- [react](https://npm.io/package/react.md) 0.13.x || 0.14.x

## 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.0.2 (latest) — 2015-12-03
- 1.0.1 — 2015-06-11
- 1.0.0 — 2015-06-11

## README

# pandapush-react

[https://www.github.com/neilgupta/pandapush-react](https://www.github.com/neilgupta/pandapush-react)

Pandapush is an event push system similar to Pusher for internal Instructure use.

## Installing

```
npm install pandapush-react
```

## Example

```javascript
var React = require('react');
var Pandapush = require('pandapush-react');

var App = React.createClass({
  handlePandapush (message) {
    console.log("Received " + message);
  },

  render: function () {
    <Pandapush 
      onReceive={ this.handlePandapush } 
      channelName="hello"
      token="sadih1iu2he12h"
      appId="PSIDv4ADyV6V9fQ2BgJZ"
      isPublic={ false }
    />
  }
});

React.render(<App/>, document.getElementById('container'));
```

## Usage

The `Pandapush` component accepts the following props:

### onReceive

A required callback function that accepts a message object received from Pandapush.

### channelName

A required string for the name of the channel to join.

### appId

A required string for your Pandapush App ID. This is optional if you store the app id in `window.pandapushAppId` instead.

### isPublic

An optional boolean for whether this is a public or private channel. Defaults to true.

### token

An optional string for passing the token needed to join a private channel. This is required if `isPublic` is `false`.

### url

An optional string for overriding the default Pandapush server url. This should probably never be used.

## Author

Neil Gupta [http://metamorphium.com](http://metamorphium.com)

## License

The MIT License (MIT) Copyright (c) 2015 Neil Gupta. See [MIT-LICENSE](https://raw.github.com/neilgupta/pandapush-react/master/MIT-LICENSE)

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