API Docs for: 0.2.2
Show:

R.Store.MemoryStore Class

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

Implementation of R.Store using a traditionnal, Flux-like memory-based Store. The store is read-only from the components,
but is writable from the toplevel using "set". Wire up to a R.Dispatcher.MemoryDispatcher to implement the canonical Flux.

Methods

destroy

()

Defined in src\R.Store.js:188

Clean UplinkStore store

fetch

(
  • key
)
Function

Defined in src\R.Store.js:82

Fetch data according to a key

Parameters:

  • key String

    The key

Returns:

Function:

fn the yielded fonction

get

(
  • key
)
Function

Defined in src\R.Store.js:100

Return data according to a key

Parameters:

  • key String

    The key

Returns:

Function:

fn the yielded fonction

serialize

() String

Defined in src\R.Store.js:209

Serialize the UplinkStore store

Returns:

String:

data The serialized UplinkStore store

set

(
  • key
  • val
)

Defined in src\R.Store.js:136

Set data according to a key, then call signalUpdate in order to rerender matching React component

Parameters:

  • key String

    The key

  • val Object

    The val

signalUpdate

(
  • key
)

Defined in src\R.Store.js:115

Triggered by the set function.
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:147

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:217

Unserialize the MemoryStore store

Parameters:

  • str String

    The string to unserialise

unsub

(
  • subscription
)

Defined in src\R.Store.js:171

Unsubscribe

Parameters:

  • subscription Object

    The subscription that contains the key to unsuscribe