1.0.14 • Published 5 years ago

shocked-react v1.0.14

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

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)

1.0.14

5 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.8

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.2

6 years ago