API Docs for: 0.2.2
Show:

R.Flux Class

Defined in: src\R.Flux.js:13

Methods

_FluxMixinAddListener

(
  • fn
  • location
)
private

Defined in src\R.Flux.js:404

Parameters:

  • fn Fonction

    The fn

  • location String

    The location

_FluxMixinEventEmitterEmit

(
  • eventEmitterName
  • eventName
  • fn
)
private

Defined in src\R.Flux.js:432

Parameters:

  • eventEmitterName String

    The eventEmitterName

  • eventName String

    The eventName

  • fn Fonction

    The fn

_FluxMixinInject

(
  • stateKey
  • location
)
private

Defined in src\R.Flux.js:327

Parameters:

  • stateKey String

    The stateKey

  • location String

    The location

_FluxMixinRemoveListener

(
  • entry
  • uniqueId
)
private

Defined in src\R.Flux.js:464

Parameters:

  • entry Object

    The entry

  • uniqueId String

    The uniqueId

_FluxMixinStoreSignalUpdate

(
  • stateKey
  • location
)
Function private

Defined in src\R.Flux.js:381

Rerendering a component when data update occurs

Parameters:

  • stateKey String

    The key to be subscribed

  • location String

    The url that will be requested

Returns:

Function:

_FluxMixinSubscribe

(
  • stateKey
  • location
)
Void private

Defined in src\R.Flux.js:348

Allow a React Component to subscribe at any data in order to fill state

Parameters:

  • stateKey String

    The key to be subscribed

  • location String

    The url that will be requested

Returns:

Void:

_FluxMixinUnsubscribe

(
  • entry
  • uniqueId
)
private

Defined in src\R.Flux.js:449

Parameters:

  • entry Object

    The entry

  • uniqueId String

    The uniqueId

_FluxMixinUpdate

(
  • props
)
private

Defined in src\R.Flux.js:289

Manage subscriptions, unsubscriptions and event emitters

Parameters:

  • props Object

    The props of component

componentDidMount

()

Defined in src\R.Flux.js:128

Call the manager subscriptions when componendDidMount is invoked by React (only client-side)

componentWillMount

()

Defined in src\R.Flux.js:95

The componentWillMount of React mechanics

Initialize flux functions for each components when componentWillMount is invoked by React

createFlux

(
  • specs
)

Defined in src\R.Flux.js:27

Returns a Flux constructor

Parameters:

  • specs Object

    The specifications of the flux

destroy

()

Defined in src\R.Flux.js:619

Clears the store by calling either this.destroyInServer or this.destroyInClient and recursively applying destroy on each store/event emittre/dispatcher.
Used for pre-rendering magic.

getDispatcher

(
  • name
)
Object

Defined in src\R.Flux.js:592

Getter for the dispatcher

Parameters:

  • name String

    The name of the store

Returns:

Object:

dispatcher The corresponding dispatcher

getEventEmitter

(
  • name
)
Object

Defined in src\R.Flux.js:564

Getter for the event emitter

Parameters:

  • name String

    The name of the store

Returns:

Object:

eventEmitter The corresponding event emitter

getFluxDispatcher

(
  • name
)
Object

Defined in src\R.Flux.js:242

Returns the FluxDispatcher according the provided name

Parameters:

  • name String

    The name

Returns:

Object:

Dispatcher the Dispatcher

getFluxEventEmitter

(
  • name
)
Object

Defined in src\R.Flux.js:233

Returns the FluxEventEmitter according the provided name

Parameters:

  • name String

    The name

Returns:

Object:

EventEmitter the EventEmitter

getInitialState

() Object

Defined in src\R.Flux.js:68

The getInitialState of React mechanics will be call at:

- React.render()
- React.renderToString()

Never return a null object, by default: {}, otherwise return data stocked from the corresponding store

Returns:

Object:

object An object like: [stateKey, data]

getStore

(
  • name
)
Object

Defined in src\R.Flux.js:538

Getter for the store

Parameters:

  • name String

    The name of the store

Returns:

Object:

store The corresponding store

prefetchFluxStores

() Void

Defined in src\R.Flux.js:144

Fetch all components from a root component in order to initialize all data, fill the corresponding stores

Executed server-side

Returns:

Void:

registerDispatcher

(
  • name
  • dispatcher
)

Defined in src\R.Flux.js:604

Register a dispatcher defined in the flux class of App

Parameters:

  • name String

    The name to register

  • dispatcher Object

    The dispatcher to register

registerEventEmitter

(
  • name
  • eventEmitter
)

Defined in src\R.Flux.js:577

Register an event emitter defined in the flux class of App

Parameters:

  • name String

    The name to register

  • eventEmitter Object

    The event emitter to register

registerStore

(
  • name
  • store
)

Defined in src\R.Flux.js:550

Register a store defined in the flux class of App
Typically : Memory or Uplink

Parameters:

  • name String

    The name to register

  • store Object

    The store to register

serialize

() String

Defined in src\R.Flux.js:515

Serialize a serialized flux by the server in order to initialize flux into client

Returns:

String:

string The serialized string

startInjectingFromStores

()

Defined in src\R.Flux.js:495

Sets the flag telling all the flux-mixed-in components to attempt to inject pre-fetched values from the cache. Used for pre-rendering magic.

startInjectingFromStores

()

Defined in src\R.Flux.js:505

Unsets the flag telling all the flux-mixed-in components to attempt to inject pre-fetched values from the cache. Used for pre-rendering magic.

unserialize

(
  • str
)

Defined in src\R.Flux.js:525

Unserialize a serialized flux by the server in order to initialize flux into client

Parameters:

  • str String

    The string to unserialize