# shocked-react

> React client side bindings for shocked api

Latest version **1.0.14** (published 2018-11-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install shocked-react
pnpm add shocked-react
yarn add shocked-react
bun add shocked-react
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.14 |
| Published | 2018-11-19 |
| First published | 2018-08-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 18.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ranjan Shrestha |
| Maintainers | syaau |

## Links

- npm: https://www.npmjs.com/package/shocked-react
- npm.io page: https://npm.io/package/shocked-react

## Dependencies (3)

- [redux](https://npm.io/package/redux.md) ^4.0.0
- [react-redux](https://npm.io/package/react-redux.md) ^5.1.1
- [shocked-client](https://npm.io/package/shocked-client.md) ^1.0.11

## Recent versions

- 1.0.14 (latest) — 2018-11-19
- 1.0.11 — 2018-11-02
- 1.0.10 — 2018-09-21
- 1.0.8 — 2018-09-20
- 1.0.6 — 2018-08-14

## README

# shocked-react
React bindings for connecting with server application
developed with `shocked` library.

## Installation
> `$ yarn add shocked-react`

or

> `$ npm install shocked-react`

## Components
### `Shocked`
A top level component that would establish connection with
the remote server.

**Props**
* `host` - Remote host (ws://localhost:3001, wss://example.com)
* `path` - The remote path to connect to. A connection is
           established only after path has been set, and a
           connection is always reset when the path is changed.

### `track`
Create a Component that track data on remote server. A track
creates a redux store with data as structured via the similarly
named Tracker on the server.

`track(trackerName, reducer)(Component)`

### `connect`
Connects a Component with the redux store created with track.

`connect(trackerName)(mapStateToProps, mapApiToProps)(Component)`

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