API Docs for: 0.2.2
Show:

R.Store.UplinkStore Class

Defined in: src\R.Store.js:335

Implementation of R.Store using a remote, REST-like Store. The store is read-only from the components,
as well as from the Client in general, but the remote backend should be wired-up with R.Dispatcher.UplinkDispatcher to implement the over-the-wire Flux.

Methods

destroy

()

Defined in src\R.Store.js:465

Clean UplinkStore store

fetch

(
  • key
)
Function

Defined in src\R.Store.js:357

Fetch data according to a key

Parameters:

  • key String

    The key

Returns:

Function:

fn the yielded fonction

serialize

() String

Defined in src\R.Store.js:447

Serialize the UplinkStore store

Returns:

String:

data The serialized UplinkStore store

signalUpdate

(
  • key
)

Defined in src\R.Store.js:381

Triggered by the socket.on("update") event in R.Uplink
Fetch data according to the given key
Call the saved function contained in subscribers

Parameters:

  • key String

    The key to fetch

sub

(
  • key
  • _signalUpdate
)
Object

Defined in src\R.Store.js:398

Subscribe at a specific key

Parameters:

  • key String

    The specific key to subscribe

  • _signalUpdate Function

    the function that will be call when a data corresponding to a key will be updated

Returns:

Object:

subscription The saved subscription

unserialize

(
  • str
)

Defined in src\R.Store.js:456

Unserialize the UplinkStore store

Parameters:

  • str String

    The string to unserialise

unsub

(
  • subscription
)

Defined in src\R.Store.js:424

Unsubscribe

Parameters:

  • subscription Object

    The subscription that contains the key to unsuscribe